Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimizer and bind variables
Using bind variables reduces hard parsing,
which is a point of contention. Getting an
extremely bad access path because of
skewed data increases cost of execution.
You have to decide how many poor access
paths you will allow and how much hard
parsing you want to avoid.
In general, where large numbers of statements are concerned, bind variables are better; where small numbers of number-crunching statements are concerned literals are better. Somewhere in a big grey area you have to take a nasty decision. (Even to the level of writing code that knows the data and generates bind-variable SQL with hints that depend on user-supplied query values).
-- 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 - 12:13:40 CST
>damned...
>so better not using bind vars???
>