Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using Index
Julia,
One point against the DBA, One point for yourself.
Yes, to use a concatenated index, you must provide the leading columns of the concatenated index.
If you need to prove this, then you can run the SQL Statement in SQL*Plus but also use;
set autotrace on explain
You will need to create the Plan Table $ORACLE_HOME/rdbms/admin/utlxplan first.
Andrew
Julia Cristina Varela de Montoya wrote:
> Can you settle a bet with our beloved DBA? He says that if a table_a:
>
> name
> ID_No
> Province
>
> has an lone index on (name,ID_NO). Then if we have
>
> sekect name from table_a
> "where ID_NO = 'xxx' ;
>
> then that it will use the index. That doesn't sound right to me.. I
> thought ID_NO would have to be on the leading edge of the index. Thanks for
> any help.
Received on Mon Apr 26 1999 - 20:49:08 CDT