On Tuesday, February 7, 2012 2:36:14 AM UTC-5, LightOfMooN wrote:
>
> I'm using loop for 100000 inserts just one time to insert 100k records 
> in database. 
> All next time I just try to get response. 
> And now in our project we have much more than 100k records, that can 
> be filtered and sorted by some dinamic conditions.
>

In order to convert query results into a DAL Rows object, the DAL has to 
loop through all the records and convert each one to a Row object (doing 
some transformations, depending on the field types). This takes a long time 
for tens of thousands of records. The code could probably be made a bit 
more efficient, but some initial attempts resulted in only small 
improvements. I'm not sure it can get dramatically faster. If you really 
need to work with that many records at a time, you're probably better off 
using executesql and working with the raw results rather than converting to 
a DAL Rows object.

Anthony

Reply via email to