TOraQuery, speed of select - order by
Posted: 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
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