<?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: Explain Plan For command may show you the wrong execution plan &#8211; Part 1</title>
	<atom:link href="http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Amardeep Sidhu</title>
		<link>http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/comment-page-1/#comment-3607</link>
		<dc:creator>Amardeep Sidhu</dc:creator>
		<pubDate>Thu, 14 Jan 2010 09:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/?p=494#comment-3607</guid>
		<description>&lt;a href=&quot;#comment-3050&quot; rel=&quot;nofollow&quot;&gt;@Tanel Poder&lt;/a&gt; 
Hi Tanel,

If it is the case of bind peeking, then it won&#039;t be a good idea to change the CURSOR_SHARING parameter to EXACT as it may affect other queries as well ? So one should try to avoid using bind variables for that particular query (after being sure that it was actually due to bind peeking only) ? Do I make some sense ? ;)

Cheers !</description>
		<content:encoded><![CDATA[<p><a href="#comment-3050" rel="nofollow">@Tanel Poder</a><br />
Hi Tanel,</p>
<p>If it is the case of bind peeking, then it won&#8217;t be a good idea to change the CURSOR_SHARING parameter to EXACT as it may affect other queries as well ? So one should try to avoid using bind variables for that particular query (after being sure that it was actually due to bind peeking only) ? Do I make some sense ? ;)</p>
<p>Cheers !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report 13/11/2009-20/11/2009 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/comment-page-1/#comment-3109</link>
		<dc:creator>Blogroll Report 13/11/2009-20/11/2009 &#171; Coskan&#8217;s Approach to Oracle</dc:creator>
		<pubDate>Sun, 22 Nov 2009 21:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/?p=494#comment-3109</guid>
		<description>[...] 13-&#8221;Explain plan for&#8221; reports wrong plan because of implicit conversion of bind variables Tanel Poder-Explain Plan For command may show you the wrong execution plan – Part 1 [...]</description>
		<content:encoded><![CDATA[<p>[...] 13-&#8221;Explain plan for&#8221; reports wrong plan because of implicit conversion of bind variables Tanel Poder-Explain Plan For command may show you the wrong execution plan – Part 1 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/comment-page-1/#comment-3050</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Thu, 19 Nov 2009 01:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/?p=494#comment-3050</guid>
		<description>Hi Jaffar,

That&#039;s probably a classic issue of bind variable peeking where &quot;wrong&quot; bind variable values were used for initial hard parse of the statement. After you changed the parameter, a new cursor was hard parsed due this parameter change and now you got lucky and &quot;right&quot; bind variable values were seen when optimizing the cursor.</description>
		<content:encoded><![CDATA[<p>Hi Jaffar,</p>
<p>That&#8217;s probably a classic issue of bind variable peeking where &#8220;wrong&#8221; bind variable values were used for initial hard parse of the statement. After you changed the parameter, a new cursor was hard parsed due this parameter change and now you got lucky and &#8220;right&#8221; bind variable values were seen when optimizing the cursor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed Jaffar Hussain</title>
		<link>http://blog.tanelpoder.com/2009/11/17/explain-plan-for-command-may-show-you-the-wrong-execution-plan-part-1/comment-page-1/#comment-3038</link>
		<dc:creator>Syed Jaffar Hussain</dc:creator>
		<pubDate>Wed, 18 Nov 2009 08:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/?p=494#comment-3038</guid>
		<description>Tanel,

Believe it or not, on 1st November I had sent you a mail describing exact situation. A query on development database was running in few seconds, where as on the production database it was taking around 4 minutes to complete. Number of records were almost the same and the execution plan was showing the INDEX RANGE SCAN on both databases. I was really puzzled about this strange behavior. When I enable 10046 trace, I found that on the production database, it was doing a FTS, though the execution plan via dbms_xplan.display was showing the INDEX RANGE SCAN. However, when I use dbms_xplan.display_cursor to produce the execution plan, surprisingly it gave me FTS. The only change I found between these databases was the CURSOR_SHARING parameter. The development db was having EXACT value and the production db was having SIMILAR value. I had every little time to investigate further due to the tremendous pressure from the business guys, I changed the value on the production SIMILAR to EXACT and the query ran in few seconds as it was running on the development. I knew it could be definitely something to do with bind variable peeking.

If you want, I can resend you all the details if you could think it would help you to investigate further on this behavior.

Regards,

Jaffar</description>
		<content:encoded><![CDATA[<p>Tanel,</p>
<p>Believe it or not, on 1st November I had sent you a mail describing exact situation. A query on development database was running in few seconds, where as on the production database it was taking around 4 minutes to complete. Number of records were almost the same and the execution plan was showing the INDEX RANGE SCAN on both databases. I was really puzzled about this strange behavior. When I enable 10046 trace, I found that on the production database, it was doing a FTS, though the execution plan via dbms_xplan.display was showing the INDEX RANGE SCAN. However, when I use dbms_xplan.display_cursor to produce the execution plan, surprisingly it gave me FTS. The only change I found between these databases was the CURSOR_SHARING parameter. The development db was having EXACT value and the production db was having SIMILAR value. I had every little time to investigate further due to the tremendous pressure from the business guys, I changed the value on the production SIMILAR to EXACT and the query ran in few seconds as it was running on the development. I knew it could be definitely something to do with bind variable peeking.</p>
<p>If you want, I can resend you all the details if you could think it would help you to investigate further on this behavior.</p>
<p>Regards,</p>
<p>Jaffar</p>
]]></content:encoded>
	</item>
</channel>
</rss>
