Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimizer and bind variables
humm, so with ora 8.1.7 using bind var is bad when i have non-uniform
distribution of a column value because histograms are never used with bind
vars??
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
news:1017224799.1035.0.nnrp-14.9e984b29_at_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 - 05:01:37 CST
![]() |
![]() |