RE: Bind Variable Peeking issue

  • From: "Allen, Brandon" <Brandon.Allen@xxxxxxxxxxx>
  • To: "Santhosh.Channa@xxxxxxxxxxxx" <Santhosh.Channa@xxxxxxxxxxxx>, "krishna000@xxxxxxxxx" <krishna000@xxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 17 Sep 2009 09:35:17 -0700

Bala, beware that disabling bind variable peeking at the system level could 
have a major impact on all other queries using bind variables on the system so 
it should be done with caution after thoroughly testing on a test database 

You don't have to analyze the table to invalidate it's dependent cursors - you 
can just issue a grant on it (e.g. grant select on mytable to system).  This is 
much faster and avoids the performance impact and other potential side effects 
of updating statistics.

In order to answer why this type of invalidation didn't resolve the problem you 
need to dig deeper to see exactly what's happening - keep an eye on the 
child_number and plan_hash_value columns of v$sql and also v$sql_bind_capture 
to see exactly what bind variables are being evaluated at hard parse time and 
what plans are being chosen for those variables.


Privileged/Confidential Information may be contained in this message or 
attachments hereto. Please advise immediately if you or your employer do not 
consent to Internet email for messages of this kind. Opinions, conclusions and 
other information in this message that do not relate to the official business 
of this company shall be understood as neither given nor endorsed by it.

Other related posts: