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

Home -> Community -> Mailing Lists -> Oracle-L -> Order by question - newbie

Order by question - newbie

From: Csillag Zsolt <starsoft_at_interware.hu>
Date: Tue, 28 Aug 2001 11:36:58 -0700
Message-ID: <F001.0037A200.20010828113649@fatcity.com>

Hi,

I have a table with 3 colums :  PersonalCode,  Name and  SpecialOrder.

The PersonalCode is the primary index and I have also an index  on SpecialOrder,Name columns.

However the following select:

Select PersonalCode From MyTable
  Order By SpecialOrder,Name

doesn't use the  SpecialOrder,Name index at all. If I watch it in Explain Plan window I can see that :

SELECT STATEMENT, GOAL =

CHOOSE                 1181    16378   2456700
 SORT ORDER
BY                  1181    16378   2456700

  TABLE ACCESS

FULL     ADMIN   MyTable 69      16378   2456700

How can I make the index work?

Thank you in advance

Zsolt Csillag
Hungary Received on Tue Aug 28 2001 - 13:36:58 CDT

Original text of this message

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