TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Time-X
Posts: 3
Joined: Tue 28 Apr 2015 21:56

TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Post by Time-X » Tue 28 Apr 2015 23:04

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.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Post by azyk » Thu 30 Apr 2015 09:07

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.

Time-X
Posts: 3
Joined: Tue 28 Apr 2015 21:56

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Post by Time-X » Fri 01 May 2015 01:49

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?

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TADOQuery.Recordset.Fields VS TMSQuery.FieldByName

Post by azyk » Wed 06 May 2015 13:34

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.

Post Reply