Hi guys,
I have a simple query using the following table:
This table contains about 25000 records.
If I use the following query:
The data returns in an instant. But if I add the clause ORDER BY COL22 DESC, it takes like 30 seconds. I've tried using hints to see if it would help but no luck. This never happened to me before and the query isn't very complicated. Anybody has any idea what the problem could be?
Thanks a lot!
Daph
I have a simple query using the following table:
Code:
COL1 NUMBER(5)
COL2 NUMBER(3)
COL3 NUMBER(4)
COL4 VARCHAR2(20)
COL5 VARCHAR2(200)
COL6 VARCHAR2(200)
COL7 NUMBER(8,2)
COL8 NUMBER(8,2)
COL9 NUMBER(8,2)
COL10 NUMBER(8,2)
COL11 NUMBER(8,2)
COL12 NUMBER(8,2)
COL13 NUMBER(8,2)
COL14 DATE
COL15 DATE
COL16 DATE
COL17 DATE
COL18 DATE
COL19 NUMBER(10)
COL20 DATE
COL21 NUMBER(10)
COL22 DATE
This table contains about 25000 records.
If I use the following query:
Code:
SELECT col1, col2, col3 FROM my_table;
The data returns in an instant. But if I add the clause ORDER BY COL22 DESC, it takes like 30 seconds. I've tried using hints to see if it would help but no luck. This never happened to me before and the query isn't very complicated. Anybody has any idea what the problem could be?
Thanks a lot!
Daph