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
> 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.comReceived on Wed Mar 28 2007 - 09:34:35 CDT