Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORDER BY - using index
In message <1141724467.219506.183180_at_j52g2000cwj.googlegroups.com>,
boguslaw.pazur_at_marcos-bis.com.pl writes
>Hello.
>
>I have simply select with ORDER BY like
>SELECT x FROM y ORDER BY z
>Oracle (version 10.2) does not use index despite of there is index on
>column z. There are many records in table so SELECT takes long.
If you query has no where clause then Oracle has to retrieve all the rows in the table. In general, a full table scan is quicker than a full index scan plus a full table's worth of fetch by rowid.
Try it with and without hint and see which is actually quicker.
-- Jim Smith I'm afraid you've mistaken me for someone who gives a damn.Received on Tue Mar 07 2006 - 04:38:25 CST