Re: ADOQuery slow

From: Arnie (none)
Date: 02/25/05


Date: Fri, 25 Feb 2005 09:10:17 -0500


"Zhuo" <zli@micros.com> wrote in message
news:421e4026@newsgroups.borland.com...
>I am converting BDE to ADO. One ADO query was executed one hundred times
> (with different parameters), each time it got a record from the database
> (ORACLE 8.1.7/ASA 6.0). It took about 2 seconds for fetching these 100
> records. However, if I use BDE for Oracle and Sybase or Direct Oracle
> Access for Oracle only, it likes a blink of eyes.
>
> Any ideas how to improve the speed?
> Thanks,
> Zhuo

I'm sure you can find a lot of tips if you Google for something like
adoquery & performance.

Quick tips:

- Set the CacheSize at least 20 to 100.

- Set the CursorType to ctOpenForwardOnly if you're not hooked to a visual
control. If you are, you'll have to use ctKeyset.

- Set the LockType to ltReadOnly.

- You might also try setting CursorLocation to clUseServer.

For Oracle, you might try executing "ALTER SESSION SET OPTIMIZER_MODE=RULE".
This sometimes improves performance over the cost-based optimizer in 8i.
I'm pretty sure, though, that it has been deprecated in versions 9 and 10.

- Arnie



Relevant Pages

  • ADOQuery slow
    ... I am converting BDE to ADO. ... One ADO query was executed one hundred times ... each time it got a record from the database ... if I use BDE for Oracle and Sybase or Direct Oracle ...
    (borland.public.delphi.database.ado)
  • Re: ADOQuery slow
    ... your strategy a little and use a stored procedure instead... ... > I am converting BDE to ADO. ... One ADO query was executed one hundred times ... if I use BDE for Oracle and Sybase or Direct Oracle ...
    (borland.public.delphi.database.ado)