Not at all !
In the case ...on table1(empno, ename), queries
speciying a where clause with ename = ... will not use
the index.
In the case ...on table1(ename, empno), queries
speciying a where clause with empno = ... will not use
the index.
To use an index, you must adress the leading part of
it.
In the case where a query used both fields in the
where clause
where ename =... and empno=....
then performanace will be better if the first field in
index is the most selective one.
- paul <pjohnpeter_at_qssnet.com> a écrit : > hi gurus,
> this is my question.
> Will "Changing the column order in the index
> definition" affect the
> result?
>
> E.g.,
>
> Are the following statements same or what?
>
> Create unique index abc on table1(empno, ename)
>
> Create unique index abc on table1(ename, empno)
>
> --
> Author: paul
> INET: pjohnpeter_at_qssnet.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Stephane Paquette
DBA Oracle
stephane_paquette_at_yahoo.com
spaquette_at_houra.fr
(33) 01 53 93 06 50
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
Received on Wed Jul 26 2000 - 02:24:28 CDT