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: Brian Peasland <dba_at_nospam.peasland.net>
Date: Wed, 28 Mar 2007 09:34:35 -0500
Message-ID: <460a7086$0$16403$88260bb3@free.teranews.com>


> 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.

Every time? This information is not correct. The first time Oracle executes a query, the execution plan is stored in the cursor cache in the SGA. The next time Oracle executes the same query, Oracle will find it in the cursor cache (provided it has not been aged out) and use the previously computed execution plan. If the SQL statement is executed 100,000 times, it would be nice if it did not have to build an execution plan 100,000 times as well. Luckily, it does not have to.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown

-- 
Posted via a free Usenet account from http://www.teranews.com
Received on Wed Mar 28 2007 - 09:34:35 CDT

Original text of this message

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