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
On Mar 28, 8:03 am, "Basavaraj Kirunge" <kiru..._at_gmail.com> 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.
Depends if the statistics for the table change, the statistics for the index change, or the query changes.
If any of the above happen ... oracle optimizer may pick a different access path.
Also varies based on your optimizer settings somewhat release dependent especially if RULE is in effect. Received on Wed Mar 28 2007 - 07:23:16 CDT