Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Mutating (SQL) execution plan!?...is that possible...stranges t thing I have every seen

Re: Mutating (SQL) execution plan!?...is that possible...stranges t thing I have every seen

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 14 Mar 2005 22:02:43 -0000
Message-ID: <021101c528e1$8fe32d70$6702a8c0@Primary>

Steve Dirschel has just sent me an example where he found multiple child cursors with

    cursor_sharing = similar,
and

    predicate involving inequality.

Sure enough - Oracle 9i generates a new child cursor for each new set of inputs
e.g.

    SELECT * from YFS_ORDER_HEADER WHERE ORDER_HEADER_KEY > '20040101'
    SELECT * from YFS_ORDER_HEADER WHERE ORDER_HEADER_KEY > '20040102'
    SELECT * from YFS_ORDER_HEADER WHERE ORDER_HEADER_KEY > '20040103'

Moreover, my test case (which once 'proved' that the only important factor was a histogram on a column in the predicate) generates new child cursors on every version of 9i I can find. So I was wrong.

Thanks to Steve, apologies to everyone else.

Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html Public Appearances - schedule updated March 9th 2005

I have never seen what Oracle calls an "unsafe" statement (i.e. <, >, between, those types of conditions in the where clause) be reparsed unless the histogram condition was met - have you ?

Even though the claim is lurking somewhere in an official Oracle document (was it an OW white-paper), I suspect it is complete rubbish. (at least up to 9i - it occurs to me that I haven't repeated that set of tests on 10g yet).

Regards

Jonathan Lewis

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 14 2005 - 17:06:13 CST

Original text of this message

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