SQL Performance question
From: rakesh <rakesh_at_cwix.com>
Date: Thu, 5 Nov 1998 22:01:27 -0800
Message-ID: <m9w02.190$pp4.1222_at_news.cwix.com>
A table is defined as ;
Date: Thu, 5 Nov 1998 22:01:27 -0800
Message-ID: <m9w02.190$pp4.1222_at_news.cwix.com>
A table is defined as ;
Table A (
Col1 NUMBER(10),
Col2 NUMBER(10),
....
Col10 NUMBER(10),
TimeStamp Date
)
[Quoted] [Quoted] A index was created using the TimeStamp column.
[Quoted] Note: query results in approx. 80000 rows.
The query " select * from a where timestamp between <date1> and <date2> " is fast.
The query " select * from a where timestamp between <date1> and <date2> order by timestamp" is also fast.
But...............the query " select * from a where timestamp between <date1> and <date2> order by timestamp desc" is very slow.
Why should that be happening, all one has done is reverse the sort order in the last query !! Received on Fri Nov 06 1998 - 07:01:27 CET