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: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 27 Mar 2002 15:12:55 -0000
Message-ID: <3ca1e186$0$236$ed9e5944@reading.news.pipex.net>


Not at all. Better not to use bind variables for those queries which don't perform as well when using bind vars as they do when using literals. Your first stop should *always* be to use bind vars and to see how you can tune that. If it turns out however that you cannot get acceptable response with bind vars but you can with literals then by all means use literals.

<opinion>
You should be able to apply a logic check to this. If you are using bind vars in say 98% of cases and literals in the remaining 2% because you can't get good performance then this sounds like a good percentage. If however you find that you are using literals in 80% of your code then almost certainl;y your performance tuning isn't what it could be </opinion>

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
"Steffen Ramlow" <s.ramlow_at_gmx.de> wrote in message
news:a7slp6$nn6gi$1_at_ID-54600.news.dfncis.de...

> damned...
> so better not using bind vars???
>
>
> "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
> news:1017232072.4172.0.nnrp-14.9e984b29_at_news.demon.co.uk...
> >
> > Correct.
> >
> > --
> > 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 ...
> > >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??
> > >
> >
> >
> >
>
>
Received on Wed Mar 27 2002 - 09:12:55 CST

Original text of this message

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