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: optimizer and bind variables

Re: optimizer and bind variables

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 27 Mar 2002 10:27:59 -0000
Message-ID: <1017224799.1035.0.nnrp-14.9e984b29@news.demon.co.uk>

It's mentioned in a couple of places as 'peeking' at bind variables.

The first time the optimizer sees a SQL statement with bind variables, it checks the actual input values and uses those values to generate an execution path. Thereafter, the same path is used for that SQL text, regardless of the actual values for the bind variables in the subsequent uses of the text.

This behaviour also appears if you use cursor_sharing=force, but can be modified if you use cursor_sharing=exact.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar - UK, April 3rd - 5th
http://www.jlcomp.demon.co.uk/seminar.html

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

Author of:
Practical Oracle 8i: Building Efficient Databases


Steffen Ramlow wrote in message ...

>> When you have literals you are giving the optimizer more information to
>> work with. In 9i, the optimizer can "take a glance" at the value of
>> bind variables under certain circumstances
>
>are u sure? where is this documented?
>and btw: i'm using 8.1.7
>
>
Received on Wed Mar 27 2002 - 04:27:59 CST

Original text of this message

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