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 18:13:40 -0000
Message-ID: <1017254486.14306.0.nnrp-14.9e984b29@news.demon.co.uk>

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 ...

>damned...
>so better not using bind vars???
>
Received on Wed Mar 27 2002 - 12:13:40 CST

Original text of this message

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