<?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: Testing Autotrace</title>
	<atom:link href="http://jonathanlewis.wordpress.com/testing-autotrace/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 01:44:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Analytic Agony &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34361</link>
		<dc:creator><![CDATA[Analytic Agony &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 07 Sep 2009 18:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34361</guid>
		<description><![CDATA[[...] I&#8217;ve turned on some tracing and enabled autotrace. Apart from the extended sql_trace (event 10046 at level 8 ) I&#8217;ve also enabled a trace on [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I&#8217;ve turned on some tracing and enabled autotrace. Apart from the extended sql_trace (event 10046 at level 8 ) I&#8217;ve also enabled a trace on [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norman Dunbar</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34305</link>
		<dc:creator><![CDATA[Norman Dunbar]]></dc:creator>
		<pubDate>Fri, 04 Sep 2009 07:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34305</guid>
		<description><![CDATA[Hi Jonathan, 

I&#039;m puzzled (as ever!) by the fact that an explain plan is generated from the Optimiser generating the plan from a parse of a statement. Why, or how, can the actual execution plan differ from the one &#039;prepared&#039; by the optimiser? 

Surely the optimiser has worked out the best execution plan and that&#039;s what *should* be run, but if not, who or what decided on running a different plan that the optimiser didn&#039;t work out?

Thanks.

Cheers,
Norman.]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan, </p>
<p>I&#8217;m puzzled (as ever!) by the fact that an explain plan is generated from the Optimiser generating the plan from a parse of a statement. Why, or how, can the actual execution plan differ from the one &#8216;prepared&#8217; by the optimiser? </p>
<p>Surely the optimiser has worked out the best execution plan and that&#8217;s what *should* be run, but if not, who or what decided on running a different plan that the optimiser didn&#8217;t work out?</p>
<p>Thanks.</p>
<p>Cheers,<br />
Norman.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34301</link>
		<dc:creator><![CDATA[Kyle Hailey]]></dc:creator>
		<pubDate>Thu, 03 Sep 2009 16:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34301</guid>
		<description><![CDATA[It&#039;s clear that the explain plan can vary between the live plan and the explain plan when the analyzing (a DBA for example) session is different from the running session (a user for example) but I was trying to think if an explain plan could be different from the live plan in the same session - all the parameters,settings, grants, schema would be the same so why would the plans differ?  There is one reason that you mentioned in CBOF p54 is that EXPLAIN PLAN doesn&#039;t do bind variable peaking and it could also get bind variable data types wrong leading to the wrong plan.

Now I&#039;m curious why AUTOTRACE does all the sampling of data and such instead of just reading the execution stats from v$sql_plan_statistics_all.  The stats in $sql_plan_statistics_all are empty unless something like _rowsource_execution_statistics=true, but that would be easy for autotrace to do and this has been possible since 9i.

Kyle Hailey]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s clear that the explain plan can vary between the live plan and the explain plan when the analyzing (a DBA for example) session is different from the running session (a user for example) but I was trying to think if an explain plan could be different from the live plan in the same session &#8211; all the parameters,settings, grants, schema would be the same so why would the plans differ?  There is one reason that you mentioned in CBOF p54 is that EXPLAIN PLAN doesn&#8217;t do bind variable peaking and it could also get bind variable data types wrong leading to the wrong plan.</p>
<p>Now I&#8217;m curious why AUTOTRACE does all the sampling of data and such instead of just reading the execution stats from v$sql_plan_statistics_all.  The stats in $sql_plan_statistics_all are empty unless something like _rowsource_execution_statistics=true, but that would be easy for autotrace to do and this has been possible since 9i.</p>
<p>Kyle Hailey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34296</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 03 Sep 2009 13:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34296</guid>
		<description><![CDATA[Kyle,

That&#039;s correct. 

In fact, worst case scenario, you can even be fooled when you run the SQL yourself and check the trace or v$sql_plan. It&#039;s always possible that you (the trouble-shooter) have a different environment from the typical end-user, and it may be an environment change that results in a different execution plan. (e.g. national character set, case insensitive sorting, session level settings for optimizer parameters).]]></description>
		<content:encoded><![CDATA[<p>Kyle,</p>
<p>That&#8217;s correct. </p>
<p>In fact, worst case scenario, you can even be fooled when you run the SQL yourself and check the trace or v$sql_plan. It&#8217;s always possible that you (the trouble-shooter) have a different environment from the typical end-user, and it may be an environment change that results in a different execution plan. (e.g. national character set, case insensitive sorting, session level settings for optimizer parameters).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Hailey</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34289</link>
		<dc:creator><![CDATA[Kyle Hailey]]></dc:creator>
		<pubDate>Wed, 02 Sep 2009 21:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-34289</guid>
		<description><![CDATA[Hey Jonathan,

   Following up on Adam&#039;s comments and tests, if I understand correctly, AUTOTRACE never prints out the live plan but always a plan from the EXPLAIN PLAN command as opposed to V$SQL_PLAN.

The only way to get the live plan is to TRACE or use v$sql_plan?

Best
Kyle]]></description>
		<content:encoded><![CDATA[<p>Hey Jonathan,</p>
<p>   Following up on Adam&#8217;s comments and tests, if I understand correctly, AUTOTRACE never prints out the live plan but always a plan from the EXPLAIN PLAN command as opposed to V$SQL_PLAN.</p>
<p>The only way to get the live plan is to TRACE or use v$sql_plan?</p>
<p>Best<br />
Kyle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mirjana</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-23520</link>
		<dc:creator><![CDATA[Mirjana]]></dc:creator>
		<pubDate>Wed, 31 Oct 2007 15:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-23520</guid>
		<description><![CDATA[Excellent post!]]></description>
		<content:encoded><![CDATA[<p>Excellent post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5130</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 08 Apr 2007 17:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5130</guid>
		<description><![CDATA[prichard,
You can&#039;t - it&#039;s one of the really irritating defects of dbms_xplan.display(). You have to judge it by eye, which isn&#039;t easy for a plan longer than a dozen lines or so.]]></description>
		<content:encoded><![CDATA[<p>prichard,<br />
You can&#8217;t &#8211; it&#8217;s one of the really irritating defects of dbms_xplan.display(). You have to judge it by eye, which isn&#8217;t easy for a plan longer than a dozen lines or so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prichard</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5127</link>
		<dc:creator><![CDATA[prichard]]></dc:creator>
		<pubDate>Sun, 08 Apr 2007 16:32:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5127</guid>
		<description><![CDATA[How do I get autotrace to show me the parent Id column in 10gr2?]]></description>
		<content:encoded><![CDATA[<p>How do I get autotrace to show me the parent Id column in 10gr2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5126</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 08 Apr 2007 16:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5126</guid>
		<description><![CDATA[Prichard,
The format of the &lt;em&gt;&lt;strong&gt;autotrace&lt;/strong&gt;&lt;/em&gt; output changed from 10.1 to 10.2 - that&#039;s partly why I tried to label every &lt;em&gt;&lt;strong&gt;autotrace&lt;/strong&gt;&lt;/em&gt; output in the book with the version it came from.

&lt;em&gt;&lt;strong&gt;Autotrace&lt;/strong&gt;&lt;/em&gt; in 10.2 uses a call to the &lt;em&gt;&lt;strong&gt;dbms_xplan.display()&lt;/strong&gt;&lt;/em&gt; function.

You will probably find, by the way, that some of the execution plans in the examples change when you run the test cases on 10.2 - there were a lot of changes to the optimizer in that version.]]></description>
		<content:encoded><![CDATA[<p>Prichard,<br />
The format of the <em><strong>autotrace</strong></em> output changed from 10.1 to 10.2 &#8211; that&#8217;s partly why I tried to label every <em><strong>autotrace</strong></em> output in the book with the version it came from.</p>
<p><em><strong>Autotrace</strong></em> in 10.2 uses a call to the <em><strong>dbms_xplan.display()</strong></em> function.</p>
<p>You will probably find, by the way, that some of the execution plans in the examples change when you run the test cases on 10.2 &#8211; there were a lot of changes to the optimizer in that version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prichard</title>
		<link>http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5117</link>
		<dc:creator><![CDATA[prichard]]></dc:creator>
		<pubDate>Sun, 08 Apr 2007 15:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/testing-autotrace/#comment-5117</guid>
		<description><![CDATA[I am currently going through your CBO Fundamentals book and have set up a test 10gr2 database for going through the examples in your book. 

I want to know how to get autotrace to display an execution plan as shown in your book - 

Execution Plan (10.1.0.4 autotrace)
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=4 Card=200 Bytes=20600)
   1    0   TABLE ACCESS (FULL) OF &#039;T1&#039; (TABLE) (Cost=4 Card=200 Bytes=20600)

But all I get to see is this --

Execution Plan
----------------------------------------------------------
Plan hash value: 3617692013

----------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name &#124; Rows  &#124; Bytes &#124; Cost  &#124;
----------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;      &#124;   200 &#124; 20600 &#124;     4 &#124;
&#124;*  1 &#124;  TABLE ACCESS FULL&#124; T1   &#124;   200 &#124; 20600 &#124;     4 &#124;
----------------------------------------------------------]]></description>
		<content:encoded><![CDATA[<p>I am currently going through your CBO Fundamentals book and have set up a test 10gr2 database for going through the examples in your book. </p>
<p>I want to know how to get autotrace to display an execution plan as shown in your book &#8211; </p>
<p>Execution Plan (10.1.0.4 autotrace)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=4 Card=200 Bytes=20600)<br />
   1    0   TABLE ACCESS (FULL) OF &#8216;T1&#8242; (TABLE) (Cost=4 Card=200 Bytes=20600)</p>
<p>But all I get to see is this &#8211;</p>
<p>Execution Plan<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Plan hash value: 3617692013</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| Id  | Operation         | Name | Rows  | Bytes | Cost  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|   0 | SELECT STATEMENT  |      |   200 | 20600 |     4 |<br />
|*  1 |  TABLE ACCESS FULL| T1   |   200 | 20600 |     4 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
	</item>
</channel>
</rss>
