TOraQuery, speed of select - order by

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
fire.tiger
Posts: 9
Joined: Thu 31 Jan 2008 20:29

TOraQuery, speed of select - order by

Post by fire.tiger » Tue 14 Oct 2008 12:18

Hi,

I have interesting problem. A Table CUS_CUSTOMER that has ~415 000
of records. I'm using the CRDBGrid (local sorting, local filtering = false).
Query (options.queryRecCount = false), fetchall = false, fetchRows = 25.

When I run this statement:
select * from CUS_CUSTOMER
then it's immediately displayed, about 0.3 milliseconds.

But when I run this statement (including the order by part):
select * from CUS_CUSTOMER order by ID desc
then it is very slow - about 18 - 19 seconds. When I run the same query in
TOAD (ver. 8.6) the same statement (including the order by part) is executed in 7 - 8 seconds.

Do you have idea why it is ? It is not necessary for me to have the same speed as TOAD,
I'm only wondering if I do everything well. If there is anything that would come up to mind
please let me know.

thank you very much
ivan

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 20 Oct 2008 09:24

We could not reproduce the problem. Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Post Reply