Page 1 of 1

TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Posted: Tue 28 Apr 2015 23:04
by Time-X
I have a table with 1 million records.

When using TADOQuery.Recordset.Fields and TADOQuery.Recordset.MoveNext the loading of the data can be done in about 40 secs.

When using TMSQuery.FieldByName and TMSQuery.Next this takes over 2 minutes.

1. How can I get the same performance out of the SDAC components?

2. Using the follow query (the table has 1 million records in it):

Code: Select all

SELECT owner_location_id, owner_id, owner_location_date_time,
       owner_location_shape.AsBinaryZM() AS owner_location_shape, owner_location_notes
FROM owner_location';
And using a TMSQuery (v7.1.3) with ReadOnly to False, the load goes fine, but if I set ReadOnly to True, an 'Out of memory' exception is raised.

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Posted: Thu 30 Apr 2015 09:07
by azyk
1. Please send the script for creating the table used in the performance test to andreyz*devart*com .

2. We have reproduced the 'Out of memory' error message - and will investigate the reason for its occurrence. We will notify you about the results as any are available.

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Posted: Fri 01 May 2015 01:49
by Time-X
Did some further testing and the slowness disappears when switching to Build Configuration: Release in Delphi XE3.

The TMSQuery is still about 15 seconds slower.

Is there a debug option I can turning off when debuging?

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Posted: Wed 06 May 2015 13:34
by azyk
1. We couldn't reproduce the problem according to your recommendations. To increase fetch performance, try to set the TMSQuery.UniDirectional property to True, and MSQuery.FetchAll - to False. See more details about UniDirectional in our documentation: http://www.devart.com/sdac/docs/#devart ... tional.htm . Please let us know whether this helped solve the issue.

2. We have fixed the error 'Out of memory'. This fix will be included in the next SDAC build.