Re: SQL Performance question

From: Nenad Noveljic <nenad.noveljic_at_optima.hr>
Date: Mon, 9 Nov 1998 10:51:54 -0000
Message-ID: <726e3c$7qr$1_at_as102.tel.hr>


In first two selects records can be spooled as soon as they are fetched from the database.
When the ORDER is specified data can be spooled after all records are fetched and sorted.

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 Mon Nov 09 1998 - 11:51:54 CET

Original text of this message