It's roundtrip per some records (depends on size of data), not each record.

Putting the records into DataTable will not be faster in any way, as it uses 
the DataReader internally.

--
Mgr. Jiří Činčura
Independent IT Specialist

________________________________________
From: Paulo Gomes <paulo_...@sapo.pt>
Sent: Saturday, August 09, 2014 4:30:41 PM
To: For users and developers of the Firebird .NET providers
Subject: Re: [Firebird-net-provider] Questions with performance metrics doing 
large inserts into DB

Hi Edward,

I think you answered yourself, the enumerator uses a trip to the database for
each record.

You should try to break the data in smaller packages (100000 for example) and
use a DataAdapter to get the data into DataTable.
If possible also use several transactions (1 per Package) to keep the memory
usage in control.
If performance is a must you can always use deal with different Threads(1 for
read and 1 for write) , though you will probably add a wanted dead or alive
sign  on my name for mentioning it.

Note: the nº of records should depend on their average size

Regards
Paulo Gomes


Em 09-08-2014 06:56, Edward Mendez escreveu:
>
>> You should start transaction explicitly. Else it's one transaction per 
>> command
>> and in a batch processing that goes out of hand really quickly.
> I agree with you 100%. The part that I hadn't given much thought was the 
> Isolation levels to pass as the parameter into the transaction object.
>
>
>> I would rather write correct algorithm than spent hours on micro-optimizing
>> loops. BTW did you know asm loops are faster than Delphi and .NET loops?
> Ah ASM, that is definitely a blast from the past.
>
> In trying to eliminate certain bottlenecks, I moved a small sample of the 
> source data to a local FB db and ran the .NET test and there it was 
> practically instantaneous reading the data. I think the Network Latency on my 
> corporate network is another factor.
> Over the weekend, I will move a more sizable sampling to my local DB and 
> attempt the test with the Reads and Write. I downloaded Red-gate (trial) and 
> will profile the App. I will keep everyone posted on the any findings.
>
> Thanks,
>
> Edward Mendez
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to