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: Does oracle guarantees index access for a query execution

Re: Does oracle guarantees index access for a query execution

From: Uwe Plonus <spam_at_sw4j.de>
Date: Wed, 28 Mar 2007 14:21:20 +0200
Message-ID: <eudmog$clf$3@online.de>


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

Original text of this message

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