<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Bind Variable Peeking &#8211; Drives Me Nuts!</title>
	<atom:link href="http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/feed/" rel="self" type="application/rss+xml" />
	<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/</link>
	<description>Just another Oracle blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 21:28:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Bind variables peeking and Adaptive Cursor Sharing (ACS) &#124; IT World</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-77234</link>
		<dc:creator>Bind variables peeking and Adaptive Cursor Sharing (ACS) &#124; IT World</dc:creator>
		<pubDate>Thu, 15 Dec 2011 16:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-77234</guid>
		<description>[...] Bind Variable Peeking – Drives Me Nuts! [...]</description>
		<content:encoded><![CDATA[<p>[...] Bind Variable Peeking – Drives Me Nuts! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-41491</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Fri, 15 Apr 2011 00:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-41491</guid>
		<description>Hi Kerry,

Its a great article, very easy to understand about bind peeking and histograms, thanks for sharing the knowledge.

I am not good in sql coding, could you please explain the description of the columns in unstable_plans.sql, awr_plan_stats.sql scripts. 

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi Kerry,</p>
<p>Its a great article, very easy to understand about bind peeking and histograms, thanks for sharing the knowledge.</p>
<p>I am not good in sql coding, could you please explain the description of the columns in unstable_plans.sql, awr_plan_stats.sql scripts. </p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-39478</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Tue, 22 Mar 2011 03:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-39478</guid>
		<description>Hi Chris,

  Any statement that runs for hours should be captured by AWR, so the scripts in the this post should help you identify that issue. Occasionally statements that run very quickly are not captured by AWR, but if they are run often (which sounds like they are in your case) they will be captured. If they run very quickly and are not capture by AWR when they are running well you may have to capture the plans directly out of the shared pool while they are running or use the ability of AWR to color a SQL statement (using dbms_workload_repository.add_colored_sql) so that it will be captured by AWR regardless of whether it makes it into the top of any category that AWR captures. Whether the instability is caused by BVP or not, the awr_plan_change.sql statement should allow you to get a pretty good idea as to when a key statement is slowing down and hopefully help you diagnose why. Hope that helps.

Kerry</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>  Any statement that runs for hours should be captured by AWR, so the scripts in the this post should help you identify that issue. Occasionally statements that run very quickly are not captured by AWR, but if they are run often (which sounds like they are in your case) they will be captured. If they run very quickly and are not capture by AWR when they are running well you may have to capture the plans directly out of the shared pool while they are running or use the ability of AWR to color a SQL statement (using dbms_workload_repository.add_colored_sql) so that it will be captured by AWR regardless of whether it makes it into the top of any category that AWR captures. Whether the instability is caused by BVP or not, the awr_plan_change.sql statement should allow you to get a pretty good idea as to when a key statement is slowing down and hopefully help you diagnose why. Hope that helps.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-39474</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 22 Mar 2011 02:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-39474</guid>
		<description>This is a great post.  We are currently struggling to understand how and why some production outages arise from what appear to be random long running queries that tie up user threads (we&#039;ve noticed an incorrect plan once before). I&#039;m trying to get info related to what plans these queries were running but our dba says the plan data didn&#039;t get captured via ASH.  Any thoughts on how we could determine if this is happening to us? It seems to fit the profile, but to date no one can put their finger on it. We see queries that should take at most a second or two take minutes and even hours sometimes..meanwhile other things run fine in the db.  Any insight would be much appreciated. Thanks!</description>
		<content:encoded><![CDATA[<p>This is a great post.  We are currently struggling to understand how and why some production outages arise from what appear to be random long running queries that tie up user threads (we&#8217;ve noticed an incorrect plan once before). I&#8217;m trying to get info related to what plans these queries were running but our dba says the plan data didn&#8217;t get captured via ASH.  Any thoughts on how we could determine if this is happening to us? It seems to fit the profile, but to date no one can put their finger on it. We see queries that should take at most a second or two take minutes and even hours sometimes..meanwhile other things run fine in the db.  Any insight would be much appreciated. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Histograms and Bind Variables, But Why? &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-35194</link>
		<dc:creator>Histograms and Bind Variables, But Why? &#171; Charles Hooper&#039;s Oracle Notes</dc:creator>
		<pubDate>Sat, 29 Jan 2011 14:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-35194</guid>
		<description>[...] Bind Variable Peeking – Drives Me Nuts! [...]</description>
		<content:encoded><![CDATA[<p>[...] Bind Variable Peeking – Drives Me Nuts! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-32756</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Thu, 23 Dec 2010 06:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-32756</guid>
		<description>Abhishek,

  I agree that setting underscore parameters is not a good idea in general. However, in this case it may be warranted. The combination of bind variable, histograms and skewed data can be deadly. While it&#039;s true that you would not be in the majority if you set _OPTIM_PEEK_USER_BINDS to false, you may be surprised to know that there are a fair number of systems that run with that setting. SAP for example uses this setting when they run on top of Oracle. That said, my preference would be to use literals where necessary to get the plans that I want. This does not mean that all statements need to use literals. In fact, it is even possible to write code that is smart about when to use literals. It is often possible to to use literals for a limited number of values while using bind variables where the optimizer doesn&#039;t really need to know the value to get a decent plan. You&#039;re also correct in that gather stats with histograms is expensive. I do believe that in many cases they are gathered where they are not needed. I wrote a pretty lengthy chapter in the recently released Apress book &quot;Pro Oracle SQL&quot; on Plan Stability and Control, by the way. It covers my thoughts on the subject in some detail.

Kerry</description>
		<content:encoded><![CDATA[<p>Abhishek,</p>
<p>  I agree that setting underscore parameters is not a good idea in general. However, in this case it may be warranted. The combination of bind variable, histograms and skewed data can be deadly. While it&#8217;s true that you would not be in the majority if you set _OPTIM_PEEK_USER_BINDS to false, you may be surprised to know that there are a fair number of systems that run with that setting. SAP for example uses this setting when they run on top of Oracle. That said, my preference would be to use literals where necessary to get the plans that I want. This does not mean that all statements need to use literals. In fact, it is even possible to write code that is smart about when to use literals. It is often possible to to use literals for a limited number of values while using bind variables where the optimizer doesn&#8217;t really need to know the value to get a decent plan. You&#8217;re also correct in that gather stats with histograms is expensive. I do believe that in many cases they are gathered where they are not needed. I wrote a pretty lengthy chapter in the recently released Apress book &#8220;Pro Oracle SQL&#8221; on Plan Stability and Control, by the way. It covers my thoughts on the subject in some detail.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ansh Abhishek</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-32751</link>
		<dc:creator>Ansh Abhishek</dc:creator>
		<pubDate>Thu, 23 Dec 2010 04:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-32751</guid>
		<description>Kerry
best explaination for the &quot;Bind Variable Peeking is not that well understood&quot; 
My personal opinion
In my opinion, however, that disabling bind peeking in situation(where client is using lot of queries with literals also) is the wrong choice, since
 (a)  still run the risk of getting unpredictable results from queries with literals; 
 (b)  will be doing tons more work during statistics collection, since histogram computation is expensive.
Regarding 
_OPTIM_PEEK_USER_BINDS
Running Oracle Database with an underscore parameter makes us different from the rest of the world, and I believe this is not how Oracle Database was tested and intended to be run in a first place .
What is your views on the same
Regards
Abhishek</description>
		<content:encoded><![CDATA[<p>Kerry<br />
best explaination for the &#8220;Bind Variable Peeking is not that well understood&#8221;<br />
My personal opinion<br />
In my opinion, however, that disabling bind peeking in situation(where client is using lot of queries with literals also) is the wrong choice, since<br />
 (a)  still run the risk of getting unpredictable results from queries with literals;<br />
 (b)  will be doing tons more work during statistics collection, since histogram computation is expensive.<br />
Regarding<br />
_OPTIM_PEEK_USER_BINDS<br />
Running Oracle Database with an underscore parameter makes us different from the rest of the world, and I believe this is not how Oracle Database was tested and intended to be run in a first place .<br />
What is your views on the same<br />
Regards<br />
Abhishek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Travaglini</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-8289</link>
		<dc:creator>Marc Travaglini</dc:creator>
		<pubDate>Wed, 17 Mar 2010 09:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-8289</guid>
		<description>Thanks for an excellent article. I was able to use it and within 10 minutes find out exactly why one particular sql had started bringing the system to its knees. Interestingly, it was not because of bind variable peeking, but because of new statistics being gathered on some tables which changed the plan for this particluar sql. The above set of queries showed this very clearly, so they are even more useful than you give them credit for!</description>
		<content:encoded><![CDATA[<p>Thanks for an excellent article. I was able to use it and within 10 minutes find out exactly why one particular sql had started bringing the system to its knees. Interestingly, it was not because of bind variable peeking, but because of new statistics being gathered on some tables which changed the plan for this particluar sql. The above set of queries showed this very clearly, so they are even more useful than you give them credit for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Fontana</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-4593</link>
		<dc:creator>Michael Fontana</dc:creator>
		<pubDate>Wed, 02 Sep 2009 20:56:58 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-4593</guid>
		<description>If you consider the fact that Oracle likely began work on the peeking &quot;feature&quot; back in 2000 or so when a VLDB was still considered to be 10G or more, they probably never really considered the full implications of it&#039;s effects on database and table sizes of today.</description>
		<content:encoded><![CDATA[<p>If you consider the fact that Oracle likely began work on the peeking &#8220;feature&#8221; back in 2000 or so when a VLDB was still considered to be 10G or more, they probably never really considered the full implications of it&#8217;s effects on database and table sizes of today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#38;raquo; Blog Archive Oracle 11g Adaptive Cursor Sharing (ACS) - Kerry Osborne’s Oracle Blog</title>
		<link>http://kerryosborne.oracle-guy.com/2009/03/bind-variable-peeking-drives-me-nuts/#comment-2243</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#38;raquo; Blog Archive Oracle 11g Adaptive Cursor Sharing (ACS) - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Mon, 01 Jun 2009 15:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=1054#comment-2243</guid>
		<description>[...] First take on observations of ACS on 11.1.0.7 [...]</description>
		<content:encoded><![CDATA[<p>[...] First take on observations of ACS on 11.1.0.7 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

