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: Using Index

Re: Using Index

From: Andrew Babb <andrewb_at_mail.com>
Date: Tue, 27 Apr 1999 09:49:08 +0800
Message-ID: <37251794.2C394FE6@mail.com>


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

Original text of this message

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