Page 1 of 1

Problem with TMSQuery in Multitier Applications

Posted: Wed 30 Nov 2011 07:16
by mashinchi
Hi, I'm working on a multitier application that I use TClientdataset and TProvider and TMsquery to connect and fetch Data from a Table on my DB.
when i use simple commandText in MSQuery such as :
Select * From MyTable
(myTable has over 200000 records)
and open the ClientDataset after 2 sec all of the data fetched but problem is that :
When I use Order By DESC clause in my commandtext such as
Select * From MyTable Order By Id DESC
and open the clientdataset this take over 30 sec.
I did my test with TAdoQuery in each way its take 10 sec.
I wanna use TMSquery in my application because fetching data in MSQuery is very fast. Please help me how can i fix this problem.
Thanks.

Posted: Thu 01 Dec 2011 11:10
by AndreyZ
Hello,

Please check that you set the same cursor types for both SDAC and ADO. Please note that if you are not using the ctDefaultResultSet cursor type in SDAC, you should set the CursorLocation property to clUseServer in ADO components to obtain the same functionality.