Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sort Behavior in 8i and 9i

Re: Sort Behavior in 8i and 9i

From: Hari Vetsa <hvetsa_at_apeakeasy.net>
Date: Thu, 27 Mar 2003 17:04:19 -0800
Message-ID: <hgWdnc-Lu_UVAh6jXTWcpg@speakeasy.net>


This won't use any index on the table.

It will do a full table scan into a temporary segment for sorting and throw the results back.

"Jamie Pearson" <jpearson_at_nspr.com> wrote in message news:b5pupq$jkj$1_at_slb6.atl.mindspring.net...
> Can anyone tell me if Oracle 8i or 9i will utilize a non-unique index when
> sorting a result set. Here's an example:
>
> TABLE_A (col1, col2, col3)
> Primary key is col1.
> Non-unique index on col3.
>
> Statement:
> SELECT * FROM TABLE_A ORDER BY col3
>
> DBA says it will, but explain plan indicates a full table scan with no
> reference to the non-unique index. Granted, explain plan has limited
> usefulness.
>
> Thanks for the help,
> Jamie
>
>
Received on Thu Mar 27 2003 - 19:04:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US