| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does oracle guarantees index access for a query execution
Basavaraj Kirunge wrote:
> I have indexes created on table mytb, explain plan of sql query which
> uses mytb shows all the indexes used which I have created.
> My question is does the indexes are used every time I execute the
> query.
> Also, if a index is created by oracle for UNIQUE and PRIMARY KEY
> Columns.. does it uses such indexes everytime
> a query executed.
>
No, it is not guaranteed that such indexes are used. Oracle calculates every time new how to build the execution plan. The plan is calculated based on your statistics.
If Oracle thinks that the indexes are very selective it will likely use them else not.
Uwe Received on Wed Mar 28 2007 - 07:21:20 CDT
![]() |
![]() |