<?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: Cursor_sharing : a picture is worth a 1000 words</title>
	<atom:link href="/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/feed/" rel="self" type="application/rss+xml" />
	<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/</link>
	<description>database performance, SQL tuning and data visualizatoin</description>
	<lastBuildDate>Wed, 04 Jan 2017 17:54:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
	<item>
		<title>By: Shared Pool &#124; My Blog</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-154073</link>
		<dc:creator>Shared Pool &#124; My Blog</dc:creator>
		<pubDate>Thu, 02 Oct 2014 21:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-154073</guid>
		<description><![CDATA[[&#8230;] http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/ [&#8230;]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href="/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/" rel="nofollow">http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/</a> [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The CURSOR_SHARING Parameter is a Silver Bullet &#8211; What is Wrong with this Quote? &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-422</link>
		<dc:creator>The CURSOR_SHARING Parameter is a Silver Bullet &#8211; What is Wrong with this Quote? &#171; Charles Hooper&#039;s Oracle Notes</dc:creator>
		<pubDate>Sun, 03 Jul 2011 18:03:52 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-422</guid>
		<description><![CDATA[[...] Kyle Hailey and Randolf Geist discuss the CURSOR_SHARING parameter in a blog article titled &#8220;Cursor_sharing: a picture is worth a 1000 words&#8220; [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Kyle Hailey and Randolf Geist discuss the CURSOR_SHARING parameter in a blog article titled &#8220;Cursor_sharing: a picture is worth a 1000 words&#8220; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-64</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Sun, 18 Jul 2010 19:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-64</guid>
		<description><![CDATA[see also&lt;br /&gt;http://blogs.oracle.com/optimizer/]]></description>
		<content:encoded><![CDATA[<p>see also<br /><a href="http://blogs.oracle.com/optimizer/" rel="nofollow">http://blogs.oracle.com/optimizer/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randolf</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-50</link>
		<dc:creator>Randolf</dc:creator>
		<pubDate>Thu, 10 Jun 2010 08:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-50</guid>
		<description><![CDATA[Kyle,&lt;br /&gt;&lt;br /&gt;I think the main issue with the CURSOR_SHARING is that it creates the child cursors unconditionally if the bind is marked as unsafe - so for each unique literal value you end up with a separate child cursor, but this is independent from the execution plan generated - so you might end up with literally thousand(s) of child cursors all having the same execution plan.&lt;br /&gt;&lt;br /&gt;This is were Adaptive Cursor Sharing is different, since it tries to &quot;group&quot; the input values to minimize the number of child cursors.&lt;br /&gt;&lt;br /&gt;However the potential drawback is that it will need a few &quot;bad&quot; executions to have Adaptive Cursor Sharing kick in which might not be acceptable in all cases since these &quot;bad&quot; executions might bring your system already to a halt.&lt;br /&gt;&lt;br /&gt;Randolf]]></description>
		<content:encoded><![CDATA[<p>Kyle,</p>
<p>I think the main issue with the CURSOR_SHARING is that it creates the child cursors unconditionally if the bind is marked as unsafe &#8211; so for each unique literal value you end up with a separate child cursor, but this is independent from the execution plan generated &#8211; so you might end up with literally thousand(s) of child cursors all having the same execution plan.</p>
<p>This is were Adaptive Cursor Sharing is different, since it tries to &quot;group&quot; the input values to minimize the number of child cursors.</p>
<p>However the potential drawback is that it will need a few &quot;bad&quot; executions to have Adaptive Cursor Sharing kick in which might not be acceptable in all cases since these &quot;bad&quot; executions might bring your system already to a halt.</p>
<p>Randolf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-49</link>
		<dc:creator>Kyle Hailey</dc:creator>
		<pubDate>Thu, 10 Jun 2010 03:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-49</guid>
		<description><![CDATA[Interesting to note that the same problem shows up for equality&lt;br /&gt;SELECT  count(*) FROM t1 where c1=val1 and c2=val2&lt;br /&gt;As Dion Cho pointed out in one of your links, maybe it has something as well to do with table stats missing, as I didn&#039;t create stats on the table.&lt;br /&gt;Which ever the case, it was definitely considered a bug back when I was at Oracle in 2005. Surprised to see similar is still an issue in 11gR2&lt;br /&gt;At one point if I recall correctly, a cursor was only allowed to have around 1000 children and after that it got errors, of the genre ORA-600. On 11gR2 I saw up to 2500 child cursors in the above example&lt;br /&gt;Thanks for the note and links]]></description>
		<content:encoded><![CDATA[<p>Interesting to note that the same problem shows up for equality<br />SELECT  count(*) FROM t1 where c1=val1 and c2=val2<br />As Dion Cho pointed out in one of your links, maybe it has something as well to do with table stats missing, as I didn&#39;t create stats on the table.<br />Which ever the case, it was definitely considered a bug back when I was at Oracle in 2005. Surprised to see similar is still an issue in 11gR2<br />At one point if I recall correctly, a cursor was only allowed to have around 1000 children and after that it got errors, of the genre ORA-600. On 11gR2 I saw up to 2500 child cursors in the above example<br />Thanks for the note and links</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randolf</title>
		<link>http://dboptimizer.com/2010/06/08/cursor_sharing-a-picture-is-worth-a-1000-words/#comment-48</link>
		<dc:creator>Randolf</dc:creator>
		<pubDate>Wed, 09 Jun 2010 19:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://dboptimizer.com/?p=107#comment-48</guid>
		<description><![CDATA[Kyle,&lt;br /&gt;&lt;br /&gt;I don&#039;t think that this is a &quot;bug&quot; per se, but intended behaviour of CURSOR_SHARING=SIMILAR.&lt;br /&gt;&lt;br /&gt;There are more reasons why the child cursor won&#039;t be shared than histograms. Basically anything that could lead to a different execution plan might lead to a bind variable being marked as &quot;unsafe&quot; which can be seen from some flag in the 10046 trace file if I remember correctly.&lt;br /&gt;&lt;br /&gt;As far as I know this is the list of reasons that lead to &quot;unsafe&quot; binds:&lt;br /&gt;&lt;br /&gt;- predicates on columns with histograms&lt;br /&gt;- range based predicates&lt;br /&gt;- predicates on partition keys&lt;br /&gt;- Dynamic Sampling&lt;br /&gt;&lt;br /&gt;For more details, see e.g.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://forums.oracle.com/forums/thread.jspa?messageID=3493934&amp;#3493934&quot; rel=&quot;nofollow&quot;&gt;Oracle Forums thread 1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://forums.oracle.com/forums/thread.jspa?messageID=3826559&amp;#3826559&quot; rel=&quot;nofollow&quot;&gt;Oracle Forums thread 2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So your example above seems to fall into the category &quot;range-based predicates&quot;.&lt;br /&gt;&lt;br /&gt;Randolf]]></description>
		<content:encoded><![CDATA[<p>Kyle,</p>
<p>I don&#39;t think that this is a &quot;bug&quot; per se, but intended behaviour of CURSOR_SHARING=SIMILAR.</p>
<p>There are more reasons why the child cursor won&#39;t be shared than histograms. Basically anything that could lead to a different execution plan might lead to a bind variable being marked as &quot;unsafe&quot; which can be seen from some flag in the 10046 trace file if I remember correctly.</p>
<p>As far as I know this is the list of reasons that lead to &quot;unsafe&quot; binds:</p>
<p>- predicates on columns with histograms<br />- range based predicates<br />- predicates on partition keys<br />- Dynamic Sampling</p>
<p>For more details, see e.g.</p>
<p><a href="http://forums.oracle.com/forums/thread.jspa?messageID=3493934&amp;#3493934" rel="nofollow">Oracle Forums thread 1</a></p>
<p><a href="http://forums.oracle.com/forums/thread.jspa?messageID=3826559&amp;#3826559" rel="nofollow">Oracle Forums thread 2</a></p>
<p>So your example above seems to fall into the category &quot;range-based predicates&quot;.</p>
<p>Randolf</p>
]]></content:encoded>
	</item>
</channel>
</rss>
