Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Binding Variable Benefit Across Sessions ?

Re: Binding Variable Benefit Across Sessions ?

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 6 Apr 2002 08:31:03 -0800
Message-ID: <a8n7s70dg8@drn.newsguy.com>


In article <a8kua5$52t$1_at_news.panix.com>, "R says...
>
>Thanks guys !
>I should have said 'ONE single DYNAMIC SQL'
>
>So if SessionA fired 'select X form TABOA where X = :w'
>and SessionB fired 'select Y form TABOA where X = :z'
>
>Now the hash_values are different, no ?
>is there gonna be a hard parse then ?
>

in this case -- two hard parses.

You have a bug in your code if you do this. dynamically generated sql statements, generated by the same piece of code, should be predicable in their generated sql. If they generated the above SQL's -- you should fix that so they DON'T.
>robert
>
>
>Sybrand Bakker wrote in message ...
>>No, if the statement in session B has the same hash_value (ie is *exactly*
>>identical), you will at least avoid the hard parse.
>
>Thomas Kyte wrote in message ...
>>
>>session b will avoid the hard parse.
>>the soft parse is unavoidable -- you gotta get started somehow.
>
>
>
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Sat Apr 06 2002 - 10:31:03 CST

Original text of this message

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