Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using Bind Variable & Hard Parsing --- All or Nothing ?
Robert:
Yes, it either matches a previous SQL stmt or not. Doesn't matter whether you have 4 out of 5 using BVs. It still hard-parses.
But, keep in mind that you can use cursor_sharing, as in:
alter session set cursor_sharing=force
That will cause Oracle to look for opportunities to use BVs where you failed to use them. This is beside the point re: the "all or nothing" question, but is good to know whether you got 4 out of 5 or 0 out of 5. But, it is always best to implement the BVs yourself.
HTH,
Tom Best
"R Chin" <rchin_at_panix.com> wrote in message
news:ahjur7$cav$2_at_reader3.panix.com...
> 8.1.7/AIX
>
> Is the usage of bind variable and the prevention of re-hard-parse an
> ALL-OR-NOTHING
> kind of situation ?
>
> I mean if in an SQL there are 5 places where BV should be used but I
missed
> one and
> used only 4 BVs --- does this TOTALLY negate the 4 BVs
> and causing a hard-parse every time ? that Oracle treats each SQL as a
> different one
> (for different values) ?
>
> Thanks
>
> Robert
>
>
>
Received on Tue Jul 23 2002 - 11:56:14 CDT