Slow query response times

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bryl
Posts: 2
Joined: Tue 11 Mar 2014 19:25

Slow query response times

Post by bryl » Tue 11 Mar 2014 19:45

Hello,
I just converted a project in XE3 from ADO to SDAC using the conversion wizard, no other changes were made. When my form opens it connects to the MSSQL 2008 DB and executes the following sql statement.
select * from formconfig where formname='INCIDENT' and type='SEARCHGRID' SDAC took 4.1sec and ADO 0.2sec with only 1 row returned and contains less than 500 bites of sql data.
This is one of many SQL statements that run. In old ADO program they all run and take less than 2 seconds to load the form. In SDAC conversion it takes 16 seconds for the same form.
There have been NO changes made to the TMSConnection or any other component since the conversion but i did confirm that DisconnectedMode was OFF and tried turning on the pooling option as per many other post regarding slow sql with no luck.

Can you advise on next steps to resolve?
Thanks
Bryan

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Slow query response times

Post by Dimon » Wed 12 Mar 2014 15:32

The issue may refer to the fact that TADOQuery sets the CursorType property to ctKeyset by default, and TMSQuery sets this property to ctDefaultResultSet. Try to set TMSQuery.CursorType to ctDefaultResultSet and check if this solves the problem.
Also, try to set the TMSQuery.Options.UniqueRecords property to False.

Post Reply