<?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: Multipart cursor subexecution and PRECOMPUTE_SUBQUERY hint</title>
	<atom:link href="http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/</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: dalin qin</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-1378</link>
		<dc:creator>dalin qin</dc:creator>
		<pubDate>Thu, 09 Apr 2009 18:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-1378</guid>
		<description>wonderful article!</description>
		<content:encoded><![CDATA[<p>wonderful article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-934</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Thu, 05 Feb 2009 04:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-934</guid>
		<description>@Karl

In 11g if you have the Diag and Tuning pack licenses, you can use V$SQL_MONITOR (or OEM for that).

Greg Rahn has written about it:
http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/

In case you don&#039;t have Diag/Tuning pack licenses or you&#039;re not on 10g, then you can use a technique of getting stack trace of the process and translating the function names to execution plan rowsource names. It&#039;s not as good as thorough solution as the 11g SQL monitoring thing though..

http://blog.tanelpoder.com/2008/06/15/advanced-oracle-troubleshooting-guide-part-6-understanding-oracle-execution-plans-with-os_explain/</description>
		<content:encoded><![CDATA[<p>@Karl</p>
<p>In 11g if you have the Diag and Tuning pack licenses, you can use V$SQL_MONITOR (or OEM for that).</p>
<p>Greg Rahn has written about it:<br />
<a href="http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/" rel="nofollow">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/</a></p>
<p>In case you don&#8217;t have Diag/Tuning pack licenses or you&#8217;re not on 10g, then you can use a technique of getting stack trace of the process and translating the function names to execution plan rowsource names. It&#8217;s not as good as thorough solution as the 11g SQL monitoring thing though..</p>
<p><a href="http://blog.tanelpoder.com/2008/06/15/advanced-oracle-troubleshooting-guide-part-6-understanding-oracle-execution-plans-with-os_explain/" rel="nofollow">http://blog.tanelpoder.com/2008/06/15/advanced-oracle-troubleshooting-guide-part-6-understanding-oracle-execution-plans-with-os_explain/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-933</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Thu, 05 Feb 2009 04:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-933</guid>
		<description>@Gary,

When you execute a query, Oracle takes the current system SCN and runs the query (consistent gets) as of that SCN. It&#039;s possible to pass a requested SCN to another query as well (like the SELECT ... FROM t AS OF SCN 123 for example), so Oracle is probably doing something similar. It gets the SCN for the subquery precomputation statement and then passes the same SCN on to the main query. That way there would be no consistency issue. I haven&#039;t tested this, if the kernel developer has forgotten to do this, then it&#039;s a bug..</description>
		<content:encoded><![CDATA[<p>@Gary,</p>
<p>When you execute a query, Oracle takes the current system SCN and runs the query (consistent gets) as of that SCN. It&#8217;s possible to pass a requested SCN to another query as well (like the SELECT &#8230; FROM t AS OF SCN 123 for example), so Oracle is probably doing something similar. It gets the SCN for the subquery precomputation statement and then passes the same SCN on to the main query. That way there would be no consistency issue. I haven&#8217;t tested this, if the kernel developer has forgotten to do this, then it&#8217;s a bug..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-928</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Wed, 04 Feb 2009 23:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-928</guid>
		<description>Hi Mladen,

Also the join itself will be replaced with a filter operation, so there will be no joining of multiple row sources, just filtering one. My (very) brief lab tests didn&#039;t show any performance improvement as CPU usage is considered though.

As I wrote in the end of the post, I intended this post only for demonstrating some new capabilities of Oracle (and intro some of my scripts), but I haven&#039;t seen any tuning/performance value for non-OLAP queries yet. 

..

David,

Hmm, interesting idea. 

Btw, Oracle 11.1.0.7 should be able to push both filter conditions and also join&#039;s bloom filters down to cell level, so join conditions can be &quot;exadata optimized&quot; even without this subquery precomputation thing (and it&#039;s possible to convert IN subqueries to semijoins..)</description>
		<content:encoded><![CDATA[<p>Hi Mladen,</p>
<p>Also the join itself will be replaced with a filter operation, so there will be no joining of multiple row sources, just filtering one. My (very) brief lab tests didn&#8217;t show any performance improvement as CPU usage is considered though.</p>
<p>As I wrote in the end of the post, I intended this post only for demonstrating some new capabilities of Oracle (and intro some of my scripts), but I haven&#8217;t seen any tuning/performance value for non-OLAP queries yet. </p>
<p>..</p>
<p>David,</p>
<p>Hmm, interesting idea. </p>
<p>Btw, Oracle 11.1.0.7 should be able to push both filter conditions and also join&#8217;s bloom filters down to cell level, so join conditions can be &#8220;exadata optimized&#8221; even without this subquery precomputation thing (and it&#8217;s possible to convert IN subqueries to semijoins..)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mladen Gogala</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-927</link>
		<dc:creator>Mladen Gogala</dc:creator>
		<pubDate>Wed, 04 Feb 2009 10:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-927</guid>
		<description>This is a very neat hint but I don&#039;t see it as being a particularly useful one. The cost of accessing the &quot;list of values&quot; table is simply transferred to the parse phase, instead of the execution phase. Do you see it as being a useful optimization tool? If so, can you expand? 
Kindest regards,</description>
		<content:encoded><![CDATA[<p>This is a very neat hint but I don&#8217;t see it as being a particularly useful one. The cost of accessing the &#8220;list of values&#8221; table is simply transferred to the parse phase, instead of the execution phase. Do you see it as being a useful optimization tool? If so, can you expand?<br />
Kindest regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Aldridge</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-922</link>
		<dc:creator>David Aldridge</dc:creator>
		<pubDate>Mon, 02 Feb 2009 21:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-922</guid>
		<description>I would expect this hint to be pretty handy (internally) for queries against fact tables on the Exadata storage platform also. It&#039;s a nice complement to a star transformation.</description>
		<content:encoded><![CDATA[<p>I would expect this hint to be pretty handy (internally) for queries against fact tables on the Exadata storage platform also. It&#8217;s a nice complement to a star transformation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #133: A Carnival of the Vanities for DBAs</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-891</link>
		<dc:creator>Log Buffer #133: A Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 30 Jan 2009 17:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-891</guid>
		<description>[...] Tanel Poder gets in-depth with cursors in Oracle. He calls it Multipart cursor subexection and PRECOMPUTE_SUBQUERY hint. [...]</description>
		<content:encoded><![CDATA[<p>[...] Tanel Poder gets in-depth with cursors in Oracle. He calls it Multipart cursor subexection and PRECOMPUTE_SUBQUERY hint. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-877</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Thu, 29 Jan 2009 00:45:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-877</guid>
		<description>Nice internals piece.
My initial thought is that, if the subquery is broken out and executed as a separate SQL in its own right, then it may no longer operate as of the same SCN. A change could, theoretically, be committed between the two such that the query results aren&#039;t accurate at a single point in time.</description>
		<content:encoded><![CDATA[<p>Nice internals piece.<br />
My initial thought is that, if the subquery is broken out and executed as a separate SQL in its own right, then it may no longer operate as of the same SCN. A change could, theoretically, be committed between the two such that the query results aren&#8217;t accurate at a single point in time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-868</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Tue, 27 Jan 2009 21:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-868</guid>
		<description>Hi Christo,

As it&#039;s undocumented and (I think) it&#039;s also meant for OLAP option queries, I don&#039;t recommend anyone actually using this for trying to tune their normal queries. 

This article aims to explain yet another layer of complexity in process of interpreting SQL and converting it into execution plan(s).</description>
		<content:encoded><![CDATA[<p>Hi Christo,</p>
<p>As it&#8217;s undocumented and (I think) it&#8217;s also meant for OLAP option queries, I don&#8217;t recommend anyone actually using this for trying to tune their normal queries. </p>
<p>This article aims to explain yet another layer of complexity in process of interpreting SQL and converting it into execution plan(s).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/comment-page-1/#comment-866</link>
		<dc:creator>Christo Kutrovsky</dc:creator>
		<pubDate>Tue, 27 Jan 2009 15:28:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/01/23/multipart-cursor-subexecution-and-precompute_subquery-hint/#comment-866</guid>
		<description>That&#039;s a pretty cool feature.

I wonder now what&#039;s a good practical case where this will come handy.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a pretty cool feature.</p>
<p>I wonder now what&#8217;s a good practical case where this will come handy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
