<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How parallel</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sat, 18 May 2013 11:04:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Plan Notes &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-39049</link>
		<dc:creator><![CDATA[Plan Notes &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 05 Jan 2011 08:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-39049</guid>
		<description><![CDATA[[...] but it seems likely that they&#8217;re intended to supply the answer to the common question &#8220;How parallel did my query go, and why [...]]]></description>
		<content:encoded><![CDATA[<p>[...] but it seems likely that they&#8217;re intended to supply the answer to the common question &#8220;How parallel did my query go, and why [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-30854</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 16 Apr 2008 18:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-30854</guid>
		<description><![CDATA[Dion Cho,

That&#039;s a useful little paper. Be careful though, I just tried &quot;high, all&quot; on a little query and ended up with a 200 Mb trace file before I killed the query ;(]]></description>
		<content:encoded><![CDATA[<p>Dion Cho,</p>
<p>That&#8217;s a useful little paper. Be careful though, I just tried &#8220;high, all&#8221; on a little query and ended up with a 200 Mb trace file before I killed the query ;(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion Cho</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-30853</link>
		<dc:creator><![CDATA[Dion Cho]]></dc:creator>
		<pubDate>Wed, 16 Apr 2008 09:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-30853</guid>
		<description><![CDATA[&quot;_px_trace&quot; might be the most convenient way.

Metalink doc# 444164.1]]></description>
		<content:encoded><![CDATA[<p>&#8220;_px_trace&#8221; might be the most convenient way.</p>
<p>Metalink doc# 444164.1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-28688</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 10 Jan 2008 18:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-28688</guid>
		<description><![CDATA[I had a little discussion with Greg Rahn recently on the topic of DFOs (data flow operations), and he pointed out that the terminology had changed, although some of the column names and statistics names had not.  

In the output from v$pq_tqstat above, there is a column labelled dfo_number - and I had been using the term DFO to refer to all the table queues (TQ_ID) within a single DFO.  Greg refers to these as parallelizers, and I think it&#039;s the thing I call a table queue that is now called a DFO.

However, if you want to see a plan with multiple DFO sections (as per v$pq_tqstat) in it, then a parallel query that manages to serialize with some non-mergeable views is one way of doing it. For example:

&lt;code&gt;
create table t1 as
select
 &#160; &#160; &#160; &#160;rownum id, object_name, object_type, owner
from
 &#160; &#160; &#160; &#160;all_objects
where
 &#160; &#160; &#160; &#160;rownum &lt;= 10000
;

create table t2 as
select * from t1;

create table t3
partition by hash (id) partitions 8
as
select * from t1
where rownum &lt;= 1;

begin
 &#160; &#160; &#160; &#160;dbms_stats.gather_table_stats(
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;user,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#039;t1&#039;,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;cascade =&gt; true,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;estimate_percent =&gt; null,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;method_opt =&gt; &#039;for all columns size 1&#039;
 &#160; &#160; &#160; &#160;);

 &#160; &#160; &#160; &#160;dbms_stats.gather_table_stats(
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;user,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#039;t2&#039;,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;cascade =&gt; true,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;estimate_percent =&gt; null,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;method_opt =&gt; &#039;for all columns size 1&#039;
 &#160; &#160; &#160; &#160;);
end;
/

alter session enable parallel dml;

spool pq_multi

explain plan for
select
 &#160; &#160; &#160; &#160;/*+
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;parallel(t1,7)
 &#160; &#160; &#160; &#160;*/
 &#160; &#160; &#160; &#160;rownum, t1.object_name, t1.object_type, t1.owner
from
 &#160; &#160; &#160; &#160;t1, &#160; &#160; &#160; &#160;
 &#160; &#160; &#160; &#160;(
 &#160; &#160; &#160; &#160;select
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;/*+
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;parallel(t1,5) 
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;*/
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;rownum, t1.object_name, t1.object_type, t1.owner
 &#160; &#160; &#160; &#160;from
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t1, &#160; &#160; &#160; &#160;
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;select
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;/*+ 
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;ordered 
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;parallel(t1,3)
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;parallel(t2,3)
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;use_hash(t2)
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;*/
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;rownum,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t1.object_name,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t2.object_type,
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t2.owner
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;from
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t1, t2
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;where
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t2.object_name = t1.object_name
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;and &#160; &#160; &#160; &#160;t2.object_type = t1.object_type
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;and &#160; &#160; &#160; &#160;t2.owner = t1.owner
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;) &#160; &#160; &#160; &#160;v1
 &#160; &#160; &#160; &#160;where
 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;v1.object_name = t1.object_name
 &#160; &#160; &#160; &#160;and &#160; &#160; &#160; &#160;v1.object_type = t1.object_type
 &#160; &#160; &#160; &#160;and &#160; &#160; &#160; &#160;v1.owner = t1.owner
 &#160; &#160; &#160; &#160;) &#160; &#160; &#160; &#160;v2
where
 &#160; &#160; &#160; &#160;v2.object_name = t1.object_name
and &#160; &#160; &#160; &#160;v2.object_type = t1.object_type
and &#160; &#160; &#160; &#160;v2.owner = t1.owner
;
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I had a little discussion with Greg Rahn recently on the topic of DFOs (data flow operations), and he pointed out that the terminology had changed, although some of the column names and statistics names had not.  </p>
<p>In the output from v$pq_tqstat above, there is a column labelled dfo_number &#8211; and I had been using the term DFO to refer to all the table queues (TQ_ID) within a single DFO.  Greg refers to these as parallelizers, and I think it&#8217;s the thing I call a table queue that is now called a DFO.</p>
<p>However, if you want to see a plan with multiple DFO sections (as per v$pq_tqstat) in it, then a parallel query that manages to serialize with some non-mergeable views is one way of doing it. For example:</p>
<p><code><br />
create table t1 as<br />
select<br />
 &nbsp; &nbsp; &nbsp; &nbsp;rownum id, object_name, object_type, owner<br />
from<br />
 &nbsp; &nbsp; &nbsp; &nbsp;all_objects<br />
where<br />
 &nbsp; &nbsp; &nbsp; &nbsp;rownum &lt;= 10000<br />
;</p>
<p>create table t2 as<br />
select * from t1;</p>
<p>create table t3<br />
partition by hash (id) partitions 8<br />
as<br />
select * from t1<br />
where rownum &lt;= 1;</p>
<p>begin<br />
 &nbsp; &nbsp; &nbsp; &nbsp;dbms_stats.gather_table_stats(<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;user,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'t1',<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cascade =&gt; true,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;estimate_percent =&gt; null,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;method_opt =&gt; 'for all columns size 1'<br />
 &nbsp; &nbsp; &nbsp; &nbsp;);</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp;dbms_stats.gather_table_stats(<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;user,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'t2',<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cascade =&gt; true,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;estimate_percent =&gt; null,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;method_opt =&gt; 'for all columns size 1'<br />
 &nbsp; &nbsp; &nbsp; &nbsp;);<br />
end;<br />
/</p>
<p>alter session enable parallel dml;</p>
<p>spool pq_multi</p>
<p>explain plan for<br />
select<br />
 &nbsp; &nbsp; &nbsp; &nbsp;/*+<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parallel(t1,7)<br />
 &nbsp; &nbsp; &nbsp; &nbsp;*/<br />
 &nbsp; &nbsp; &nbsp; &nbsp;rownum, t1.object_name, t1.object_type, t1.owner<br />
from<br />
 &nbsp; &nbsp; &nbsp; &nbsp;t1, &nbsp; &nbsp; &nbsp; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp;(<br />
 &nbsp; &nbsp; &nbsp; &nbsp;select<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/*+<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parallel(t1,5)<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rownum, t1.object_name, t1.object_type, t1.owner<br />
 &nbsp; &nbsp; &nbsp; &nbsp;from<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t1, &nbsp; &nbsp; &nbsp; &nbsp;<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;select<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/*+<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ordered<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parallel(t1,3)<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parallel(t2,3)<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;use_hash(t2)<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rownum,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t1.object_name,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t2.object_type,<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t2.owner<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t1, t2<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t2.object_name = t1.object_name<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and &nbsp; &nbsp; &nbsp; &nbsp;t2.object_type = t1.object_type<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and &nbsp; &nbsp; &nbsp; &nbsp;t2.owner = t1.owner<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;) &nbsp; &nbsp; &nbsp; &nbsp;v1<br />
 &nbsp; &nbsp; &nbsp; &nbsp;where<br />
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v1.object_name = t1.object_name<br />
 &nbsp; &nbsp; &nbsp; &nbsp;and &nbsp; &nbsp; &nbsp; &nbsp;v1.object_type = t1.object_type<br />
 &nbsp; &nbsp; &nbsp; &nbsp;and &nbsp; &nbsp; &nbsp; &nbsp;v1.owner = t1.owner<br />
 &nbsp; &nbsp; &nbsp; &nbsp;) &nbsp; &nbsp; &nbsp; &nbsp;v2<br />
where<br />
 &nbsp; &nbsp; &nbsp; &nbsp;v2.object_name = t1.object_name<br />
and &nbsp; &nbsp; &nbsp; &nbsp;v2.object_type = t1.object_type<br />
and &nbsp; &nbsp; &nbsp; &nbsp;v2.owner = t1.owner<br />
;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaiyaohuang</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-28661</link>
		<dc:creator><![CDATA[kaiyaohuang]]></dc:creator>
		<pubDate>Thu, 10 Jan 2008 13:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-28661</guid>
		<description><![CDATA[Hi, I think that here DFO means DFO tree here, could you give me an example of query that using multiple DFO trees?
It&#039;s best if you can also mail to kaiyao.huang@gmail.com:)]]></description>
		<content:encoded><![CDATA[<p>Hi, I think that here DFO means DFO tree here, could you give me an example of query that using multiple DFO trees?<br />
It&#8217;s best if you can also mail to <a href="mailto:kaiyao.huang@gmail.com">kaiyao.huang@gmail.com</a>:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Aldridge</title>
		<link>http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-3964</link>
		<dc:creator><![CDATA[David Aldridge]]></dc:creator>
		<pubDate>Wed, 14 Mar 2007 14:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/03/14/how-parallel/#comment-3964</guid>
		<description><![CDATA[One advantage that we users of PQ have at least is that the overhead of all the optional tracing is relatively small, so automaticaly dumping post-query wait stats and plans, or pre-emptively turning on tracing, is not some system-halting issue. 

I like this 10391 -- useful stuff, and thanks.]]></description>
		<content:encoded><![CDATA[<p>One advantage that we users of PQ have at least is that the overhead of all the optional tracing is relatively small, so automaticaly dumping post-query wait stats and plans, or pre-emptively turning on tracing, is not some system-halting issue. </p>
<p>I like this 10391 &#8212; useful stuff, and thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
