Board index » delphi » Why is DBExpress so slow compared to ADO
Preston
![]() Delphi Developer |
Preston
![]() Delphi Developer |
Why is DBExpress so slow compared to ADO2007-08-02 12:13:40 AM delphi186 I have 1 master query and two detail queries. I have the master query iterate through 2000 records. Using ADO this takes 6 seconds. Using DBExpress it takes 60. Why is DBExpress performing so bad? Using SQL Server Express 2005 |
Bill Todd
![]() Delphi Developer |
2007-08-02 12:37:25 AM
Re:Why is DBExpress so slow compared to ADO
Preston writes:
QuoteI have 1 master query and two detail queries. I have the master query What components are you using with ADO and dbExpress? I assume you are using Delphi 2007 and DBX4 since you did not say otherwise. Is that correct? Are you using a client side cursor with ADO? Are you using a ClientDataSet and DataSetProvider with DBX? How many rows does the master query return? How are you creating the master/detail link with ADO? How are you creating the master detail link with DBX? -- Bill Todd (TeamB) |
Preston
![]() Delphi Developer |
2007-08-02 12:44:34 AM
Re:Why is DBExpress so slow compared to ADO
Hi Bill,
Answers are inline. QuoteWhat components are you using with ADO and dbExpress? QuoteI assume you are using Delphi 2007 and DBX4 since you did not say otherwise. Is that correct? QuoteAre you using a client side cursor with ADO? QuoteAre you using a ClientDataSet and DataSetProvider with DBX? QuoteHow many rows does the master query return? QuoteHow are you creating the master/detail link with ADO? QuoteHow are you creating the master detail link with DBX? var x : integer; begin // ADOQuery1.Active := True; // ADOQuery2.Active := True; // ADOQuery3.Active := True; SQLQuery1.Active := True; SQLQuery2.Active := True; // SQLQuery3.Active := True; //SQLQuery4.Active := True; //SQLQuery5.Active := True; x := 0; while not SQLQuery1.Eof do begin label1.Caption := intToStr(x); inc(x); SQLQuery1.Next; Application.ProcessMessages; end; SQLQuery1.Active := False; end; |
Bill Todd
![]() Delphi Developer |
2007-08-02 01:36:23 AM
Re:Why is DBExpress so slow compared to ADO
I don't know what the difference is. Since you do not access any value
in the record it is possible that ADO does not fetch the record from the server and DBX does. I'd change the code to assign the value from some field to a variable and see what happens. I'd also try just the master query without the details and see what happens. -- Bill Todd (TeamB) |
Preston
![]() Delphi Developer |
2007-08-02 02:36:09 AM
Re:Why is DBExpress so slow compared to ADO
"Bill Todd" <XXXX@XXXXX.COM>writes:
QuoteI don't know what the difference is. Since you do not access any value Is there a way to turn the client side caching off for ADO? |
Bill Todd
![]() Delphi Developer |
2007-08-02 03:16:13 AM
Re:Why is DBExpress so slow compared to ADO
Preston writes:
QuoteIs there a way to turn the client side caching off for ADO? Bill Todd (TeamB) |