| View previous topic :: View next topic |
| Author |
Message |
Andrew Guest
|
Posted: Sat Sep 13, 2003 11:55 pm Post subject: Slow performance on ADO query |
|
|
When I execute a query against a number of linked (ODBC) tables using the MS
Access environment, the query runs very fast (less than 1 second). When the
same query is passed through an ADO connection to the same MDB database
(using a TADOConnection and a TBetterADODataset), the query takes much
longer - up to 5 seconds or more.
I suspect that there might be some optimising being done by MS Access and
the JET engine to explain the performance difference - does anyone have
ideas as to how I could get the faster performance through ADO?
Thanks in advance,
Andrew
|
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Mon Sep 15, 2003 9:35 am Post subject: Re: Slow performance on ADO query |
|
|
Thanks, but what about a query?
"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> wrote
| Quote: |
I suspect that there might be some optimising being done by MS Access and
the JET engine to explain the performance difference - does anyone have
ideas as to how I could get the faster performance through ADO?
With a TadoDataset you want to use Serverside cursors and TableDirect =
true to
get as close to how Access handles opening a table.
Also DisableControls on the TadoDataset before you open it will give
better
performance if it is a large table.
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Tue Sep 16, 2003 7:00 am Post subject: Re: Slow performance on ADO query |
|
|
Many thanks.
"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> wrote
| Quote: |
Thanks, but what about a query?
Access uses serverside cursors for Queries too. If the query result set
is
large a serverside cursor will return a view of the records before a
clientside
cursor. A clientside cursor loads entirely in memory before displaying.
A
Serverside cursor will be buffered by the engine in some Oledb drivers
like JET.
The downside of serverside cursors is they consume more resources so your
performance drops off faster as you add users.
The advice on disableControls is the same.
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
|