Re: SQL Performance question

From: Arati Bheemidi <Arati.Bheemidi_at_worldnet.att.net>
Date: 7 Nov 1998 21:35:34 GMT
Message-ID: <722ef6$b1h_at_bgtnsc02.worldnet.att.net>


because after getting the data it is trying to sort all the record in the descending order so it takes time...
rakesh wrote in message ...
>A table is defined as ;
>
>Table A (
>Col1 NUMBER(10),
>Col2 NUMBER(10),
>....
>Col10 NUMBER(10),
>TimeStamp Date
>)
>
>A index was created using the TimeStamp column.
>
>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 Sat Nov 07 1998 - 22:35:34 CET

Original text of this message