| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimizer and bind variables
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 ...Received on Wed Mar 27 2002 - 04:27:59 CST
>> 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
>
>
![]() |
![]() |