BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow performance on ADO query

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Andrew
Guest





PostPosted: Sat Sep 13, 2003 11:55 pm    Post subject: Slow performance on ADO query Reply with quote



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





PostPosted: Mon Sep 15, 2003 9:35 am    Post subject: Re: Slow performance on ADO query Reply with quote



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





PostPosted: Tue Sep 16, 2003 7:00 am    Post subject: Re: Slow performance on ADO query Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.