Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: easy index question
Hi Richard,
Yes the index will be used, but i think you canīt say what is faster unless you know the selectivity of col3. If there are not many distinct values and you can use a bitmap index this will be faster.
The best way to test it: trace 2 session (one with only one, one with 2 indexes) then take a look at the tkprof output.
Best regards
Richard wrote:
>
> Easy question on indexes.
>
> I have 2 indexes on a table:
>
> index1 on columns col1,col2,col3
> index2 on column col3
>
> if I remove col3 from index1 and then use col1,col2 and col3 in a SQL
> statement where clause (in that order) will both index1 and index2 be
> used?
> Will the search be more efficient if the three columns are in a single
> index (the table is rarely modified).
>
> Hope the above makes sense. Any help on this gratefully received.
>
> regards
>
> Richard
Received on Thu Jun 24 1999 - 07:23:02 CDT
![]() |
![]() |