<?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: Subquery Factoring</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 19 Jun 2013 12:03:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Subquery Factoring (4) &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-37313</link>
		<dc:creator><![CDATA[Subquery Factoring (4) &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 16 Sep 2010 09:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-37313</guid>
		<description><![CDATA[[...] Articles:  Complex View Merging Subquery Factoring 1 Subquery Factoring 2 Subquery Factoring (3) Pushing Predicates (1) Pushing Predicates [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Articles:  Complex View Merging Subquery Factoring 1 Subquery Factoring 2 Subquery Factoring (3) Pushing Predicates (1) Pushing Predicates [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Plans in Memory &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-35463</link>
		<dc:creator><![CDATA[Plans in Memory &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 11 Feb 2010 08:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-35463</guid>
		<description><![CDATA[[...] may want to keep some of your old scripts handy for a while &#8211; you should think about using  subquery factoring &#8211; for example (with just a very simple and far from complete  plan [...]]]></description>
		<content:encoded><![CDATA[<p>[...] may want to keep some of your old scripts handy for a while &#8211; you should think about using  subquery factoring &#8211; for example (with just a very simple and far from complete  plan [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34075</link>
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Fri, 07 Aug 2009 08:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34075</guid>
		<description><![CDATA[Thanks for your good guess.

The kind of IO oracle used surprised me at first, so I did a test to verify. Of course I takes your word, but anyone could have some typo, and I hope one day I can catch one of your typo :).]]></description>
		<content:encoded><![CDATA[<p>Thanks for your good guess.</p>
<p>The kind of IO oracle used surprised me at first, so I did a test to verify. Of course I takes your word, but anyone could have some typo, and I hope one day I can catch one of your typo :).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34061</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 06 Aug 2009 16:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34061</guid>
		<description><![CDATA[Daniel,

I approve of you desire to test an verify - so I&#039;m only slightly upset that you didn&#039;t take my word for it ;)

The answer to your question is one that I often have to give to the many questions that people put to me about why Oracle does something in a certain - I don&#039;t know, I didn&#039;t write the specification or the code.

However, I can speculate.  If you assume that subquery factoring exists to allow large temporary results sets to be reusable within a query, then Oracle may have decided that writing to temp then reading to the buffer cache would be less of a threat to memory than creating and keeping the result set in the PGA.

This, in many cases, is the difference between &quot;with subquery&quot; and deliberately introducing an inline non-mergeable view. (Although the materialized data can, of course, be used in multiple places in the same query, while the in-line view cannot).]]></description>
		<content:encoded><![CDATA[<p>Daniel,</p>
<p>I approve of you desire to test an verify &#8211; so I&#8217;m only slightly upset that you didn&#8217;t take my word for it ;)</p>
<p>The answer to your question is one that I often have to give to the many questions that people put to me about why Oracle does something in a certain &#8211; I don&#8217;t know, I didn&#8217;t write the specification or the code.</p>
<p>However, I can speculate.  If you assume that subquery factoring exists to allow large temporary results sets to be reusable within a query, then Oracle may have decided that writing to temp then reading to the buffer cache would be less of a threat to memory than creating and keeping the result set in the PGA.</p>
<p>This, in many cases, is the difference between &#8220;with subquery&#8221; and deliberately introducing an inline non-mergeable view. (Although the materialized data can, of course, be used in multiple places in the same query, while the in-line view cannot).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34032</link>
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Tue, 04 Aug 2009 05:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-34032</guid>
		<description><![CDATA[&quot;using direct path writes before reading it back with db file scattered reads.&quot;

I did a test and it really did &quot;db file scattered reads&quot; to read back. Why doesn&#039;t oracle read back using &quot;direct path read&quot; which will bypass SGA and use no latch?]]></description>
		<content:encoded><![CDATA[<p>&#8220;using direct path writes before reading it back with db file scattered reads.&#8221;</p>
<p>I did a test and it really did &#8220;db file scattered reads&#8221; to read back. Why doesn&#8217;t oracle read back using &#8220;direct path read&#8221; which will bypass SGA and use no latch?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Full Hinting &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-31189</link>
		<dc:creator><![CDATA[Full Hinting &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Tue, 10 Jun 2008 15:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-31189</guid>
		<description><![CDATA[[...] have  to do things like introduce partial order through in-line views with no_merge hints, or subquery factoring with materialize hints to get the plan you [...]]]></description>
		<content:encoded><![CDATA[<p>[...] have  to do things like introduce partial order through in-line views with no_merge hints, or subquery factoring with materialize hints to get the plan you [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subquery Factoring (2) &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-15732</link>
		<dc:creator><![CDATA[Subquery Factoring (2) &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 19 Jul 2007 20:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-15732</guid>
		<description><![CDATA[[...] &#8212; Jonathan Lewis @ 8:24 pm UTC Jul 26,2007   I&#8217;ve written about subquery factoring a few times in the past and commented on the use of the /*+ materialize */ hint. Recently I had time to think [...]]]></description>
		<content:encoded><![CDATA[<p>[...] &#8212; Jonathan Lewis @ 8:24 pm UTC Jul 26,2007   I&#8217;ve written about subquery factoring a few times in the past and commented on the use of the /*+ materialize */ hint. Recently I had time to think [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Functions &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-14713</link>
		<dc:creator><![CDATA[Functions &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 09 Jul 2007 05:39:08 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-14713</guid>
		<description><![CDATA[[...] to access the entire data set and produce a result table - either with a no_merge view, or a materialized factored subquery - is a good starting step - then join this result into the original [...]]]></description>
		<content:encoded><![CDATA[<p>[...] to access the entire data set and produce a result table &#8211; either with a no_merge view, or a materialized factored subquery &#8211; is a good starting step &#8211; then join this result into the original [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Internet SQL &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-14073</link>
		<dc:creator><![CDATA[Internet SQL &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 02 Jul 2007 00:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-14073</guid>
		<description><![CDATA[[...] and we&#8217;re going to join it to itself, it would probably be a good idea to take advantage of subquery factoring to materialize the smallest result set before joining to the rest of the views. We might start [...]]]></description>
		<content:encoded><![CDATA[<p>[...] and we&#8217;re going to join it to itself, it would probably be a good idea to take advantage of subquery factoring to materialize the smallest result set before joining to the rest of the views. We might start [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-32</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 31 Oct 2006 21:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/30/subquery-factorintg/#comment-32</guid>
		<description><![CDATA[David, As far as I am aware, you &lt;b&gt;always&lt;/b&gt; get a dump to disc if the subquery is materialized - even if it&#039;s only one row.
It&#039;s some time since I last tested this though, so it may be something that has (or will) change in the newer versions.]]></description>
		<content:encoded><![CDATA[<p>David, As far as I am aware, you <b>always</b> get a dump to disc if the subquery is materialized &#8211; even if it&#8217;s only one row.<br />
It&#8217;s some time since I last tested this though, so it may be something that has (or will) change in the newer versions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
