Re: Enhancing ADO Performance

From: Arnie Mauer (someone_at_microsoft.com)
Date: 06/24/04


Date: Thu, 24 Jun 2004 10:23:51 -0400


"Dave" <dave@powerworld.com> wrote in message
news:40d9cd1a$1@newsgroups.borland.com...
> We are currently exploring the retrieval of data for our software from
> database sources by composing some small test applications (D7 Pro). We
> currently have applications constructed to retrieve data from ODBC
> tables using the native BDE connection and using the ADO connection. We
> worked with both because of the installation issues when using the BDE
> approach, such as the bundled BDE dll and potential registry access for
> BDE purposes during the application installation. It seems that ADO
> would avoid many of these BDE installation issues, but also seems to be
> somewhat slower in its data retrieval than the BDE application we've
> written to retrieve the same data from the same source.
>
> Does anybody have any suggestions on how to improve the performance of the
> ADO connection?
>
> Thanks
> Dave Savageau

We went through the same thing when porting from the BDE to ADO.

You can do a lot to tune up an ADO dataset or query via the properties. You
have to understand these. Check the help. For example, if looking up a lot
of data and hooking to a DB grid, use a server-side cursor (CursorLocation).
Only enough data will be brought over to the client to satisfy the grid. A
cient side cursor will read the entire result set over to the client.

If you're not hooked to a DB aware control and just have to read and process
the data (and a lot of it), set CursorType to ctOpenForwardOnly. ctKeyset
is required for hooking to a grid and is much slower because the grid has to
move forward AND backward in the result set.

If you're reading quite a bit of data, set the BlockReadSize property to
100-400. This improves performance quite a bit.

Also, as Del said, avoid the TADOTable like the plague.

HTH,

- Arnie



Relevant Pages

  • Re: Enhancing ADO Performance
    ... > currently have applications constructed to retrieve data from ODBC ... > worked with both because of the installation issues when using the BDE ... It seems that ADO ... The execution plan is also saved. ...
    (borland.public.delphi.database.ado)
  • Re: Delphi 5.0 ADO with d5adoupdate2 fail with findNext ?
    ... Do the TQuery have build in cursor? ... Ado gives BOF / EOF, ... BDE let me write simpler code, ... ADODB.pas file is simply because the Cursor is not assigned and checking BOF or EOF ...
    (borland.public.delphi.database.ado)
  • Re: On ADSI and LDAP
    ... the problem is how can I retrieve the value for myuser using the ... would be more efficient to use ADO to query AD for the attributes values. ... For more on using ADO, ... Dim adoCommand, adoConnection, strBase, strFilter, strAttributes ...
    (microsoft.public.scripting.vbscript)
  • Re: Returning only a subset of groups in AD
    ... Output.WriteLine "There are no members in this group." ... I assume that ADSICommand is an ADO command object, ... value assigned to the CommandText property, which is the ADO query. ... ' Comma delimited list of attribute values to retrieve. ...
    (microsoft.public.scripting.vbscript)
  • Re: Looking for a VB to export all Users and their descripitions
    ... You can use ADO to retrieve all user names and the value of the description ... Dim strNTName, lngUSN, strDescription, colDescription, strItem ... Set adoConnection = CreateObject ... ' Comma delimited list of attribute values to retrieve. ...
    (microsoft.public.windows.server.active_directory)