<?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: SQL Performance Problem, AWR Reports Query is #1 in Elapsed Time, #2 in CPU Time &#8211; How Would You Help?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Burleson buys BMC ? &#171; Oracle Scratchpad</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2905</link>
		<dc:creator><![CDATA[Burleson buys BMC ? &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 28 Feb 2011 09:50:57 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2905</guid>
		<description><![CDATA[[...] original article is back &#8211; with a note about the false DMCA claim. I can&#8217;t help noticing that the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] original article is back &#8211; with a note about the false DMCA claim. I can&#8217;t help noticing that the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2794</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 23:18:41 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2794</guid>
		<description><![CDATA[Gary,

Thanks for performing the Google search - I tried, but initially did not search on that keyword.  Good idea to check the scheduled run frequency - if this AWR report covers a one hour time period, the above SQL statement is executed an average of three times per second (by different sessions, obviously because of the 1.90 second average elapsed time for the SQL statement).

It appears that the OP is not alone, as the Google search found another company experiencing similar problems with a query that appears to be quite similar:  
http://www.freelists.org/post/oracle-l/DB-Performance-Issue
If we ignore the fact that the other database has CURSOR_SHARING set to either FORCE or SIMILAR, it appears that BMC attempted to modify the program&#039;s queries since the time of the post on the Oracle L list in 2007, so that the queries no longer specify the deprecated RULE hint.

The Google search also apparently found the manual for the product:
ftp://ftp.bmc.com/pub/patrol/patches/PKM_ORACLE/NT/8.9.00/PATROL%20for%20Oracle%20User%20Guide.pdf
On page 332 of the manual, we see that the programmers of this product are a bit too creative with extent size definitions:
[code 1=&quot;initial&quot; 2=&quot;50k,&quot; 3=&quot;next&quot; 4=&quot;50k,&quot; 5=&quot;pctincrease&quot; 6=&quot;0&quot; 7=&quot;initial&quot; 8=&quot;256K,&quot; 9=&quot;next&quot; 10=&quot;256K,&quot; 11=&quot;pctincrease&quot; 12=&quot;0&quot; 13=&quot;initial&quot; 14=&quot;20k,&quot; 15=&quot;next&quot; 16=&quot;20k,&quot; 17=&quot;pctincrease&quot; 18=&quot;0&quot; 19=&quot;[/code&quot; language=&quot;}&quot;][/code]]]></description>
		<content:encoded><![CDATA[<p>Gary,</p>
<p>Thanks for performing the Google search &#8211; I tried, but initially did not search on that keyword.  Good idea to check the scheduled run frequency &#8211; if this AWR report covers a one hour time period, the above SQL statement is executed an average of three times per second (by different sessions, obviously because of the 1.90 second average elapsed time for the SQL statement).</p>
<p>It appears that the OP is not alone, as the Google search found another company experiencing similar problems with a query that appears to be quite similar:<br />
<a href="http://www.freelists.org/post/oracle-l/DB-Performance-Issue" rel="nofollow">http://www.freelists.org/post/oracle-l/DB-Performance-Issue</a><br />
If we ignore the fact that the other database has CURSOR_SHARING set to either FORCE or SIMILAR, it appears that BMC attempted to modify the program&#8217;s queries since the time of the post on the Oracle L list in 2007, so that the queries no longer specify the deprecated RULE hint.</p>
<p>The Google search also apparently found the manual for the product:<br />
<a href="ftp://ftp.bmc.com/pub/patrol/patches/PKM_ORACLE/NT/8.9.00/PATROL%20for%20Oracle%20User%20Guide.pdf" rel="nofollow">ftp://ftp.bmc.com/pub/patrol/patches/PKM_ORACLE/NT/8.9.00/PATROL%20for%20Oracle%20User%20Guide.pdf</a><br />
On page 332 of the manual, we see that the programmers of this product are a bit too creative with extent size definitions:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2793</link>
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 22:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2793</guid>
		<description><![CDATA[A Google search throws up P$OBJ_EXCLUSION as part of a BMC  monitoring tool. As such any changes to the SQL might be impractical.

I&#039;d start by looking at how frequently this job is scheduled to run.]]></description>
		<content:encoded><![CDATA[<p>A Google search throws up P$OBJ_EXCLUSION as part of a BMC  monitoring tool. As such any changes to the SQL might be impractical.</p>
<p>I&#8217;d start by looking at how frequently this job is scheduled to run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2792</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 20:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2792</guid>
		<description><![CDATA[Niall,

You might be correct regarding the intended use of this SQL statement.

Something possibly interesting, an extension of my third bullet point at the end of this article.  What if the segment described by this (returned by the main SELECT clause):
[code]
NVL(MIN(DSE.MAXEXTS - DSE.EXTENTS), 111)
[/code]
Is not the same object as described by this (also returned by the main SELECT clause):
[code]
NVL(MIN(ROUND(DSE.MAXEXTS - DSE.EXTENTS) * 100 / DSE.MAXEXTS), 100)
[/code]

This is definitely one of those SQL statements that makes people (at least me) stop and think for a couple of minutes.  I am beginning to wonder if the real task is *not* to improve the performance of this SQL statement.]]></description>
		<content:encoded><![CDATA[<p>Niall,</p>
<p>You might be correct regarding the intended use of this SQL statement.</p>
<p>Something possibly interesting, an extension of my third bullet point at the end of this article.  What if the segment described by this (returned by the main SELECT clause):</p>
<pre class="brush: plain; title: ; notranslate">
NVL(MIN(DSE.MAXEXTS - DSE.EXTENTS), 111)
</pre>
<p>Is not the same object as described by this (also returned by the main SELECT clause):</p>
<pre class="brush: plain; title: ; notranslate">
NVL(MIN(ROUND(DSE.MAXEXTS - DSE.EXTENTS) * 100 / DSE.MAXEXTS), 100)
</pre>
<p>This is definitely one of those SQL statements that makes people (at least me) stop and think for a couple of minutes.  I am beginning to wonder if the real task is *not* to improve the performance of this SQL statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niall Litchfield</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2791</link>
		<dc:creator><![CDATA[Niall Litchfield]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 20:11:03 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2791</guid>
		<description><![CDATA[Hi Charles

I too would be asking the purpose of this. It rather looks like do it yourself space management (am I about to run out of extents.) But I can&#039;t see a) why you would do this and b) why you would do this 10k times. 

Niall]]></description>
		<content:encoded><![CDATA[<p>Hi Charles</p>
<p>I too would be asking the purpose of this. It rather looks like do it yourself space management (am I about to run out of extents.) But I can&#8217;t see a) why you would do this and b) why you would do this 10k times. </p>
<p>Niall</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2790</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 19:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2790</guid>
		<description><![CDATA[That reminds me.  Before closing that thread, Mr. B. should have told the OP to add the FAST PERFORMANCE hint in front of the other hints, like this:
[code]
/*+ FAST PERFORMANCE  FROST_ROWS_10 */
[/code]
As demonstrated here:
http://hoopercharles.wordpress.com/2011/01/15/adding-comments-to-sql-statements-improves-performance/#comment-2680

There is a very recent thread on the comp.databases.oracle.server Usenet group about hints, but it is too bad that not all RDBMS platforms support the FAST PERFORMANCE hints :-)
http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/6ba1d443103eabcd/4219a0a25edf1677]]></description>
		<content:encoded><![CDATA[<p>That reminds me.  Before closing that thread, Mr. B. should have told the OP to add the FAST PERFORMANCE hint in front of the other hints, like this:</p>
<pre class="brush: plain; title: ; notranslate">
/*+ FAST PERFORMANCE  FROST_ROWS_10 */
</pre>
<p>As demonstrated here:<br />
<a href="http://hoopercharles.wordpress.com/2011/01/15/adding-comments-to-sql-statements-improves-performance/#comment-2680" rel="nofollow">http://hoopercharles.wordpress.com/2011/01/15/adding-comments-to-sql-statements-improves-performance/#comment-2680</a></p>
<p>There is a very recent thread on the comp.databases.oracle.server Usenet group about hints, but it is too bad that not all RDBMS platforms support the FAST PERFORMANCE hints <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<a href="http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/6ba1d443103eabcd/4219a0a25edf1677" rel="nofollow">http://groups.google.com/group/comp.databases.oracle.server/browse_thread/thread/6ba1d443103eabcd/4219a0a25edf1677</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Preiss</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2789</link>
		<dc:creator><![CDATA[Martin Preiss]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 19:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2789</guid>
		<description><![CDATA[a reasonable decision of the spam filter]]></description>
		<content:encoded><![CDATA[<p>a reasonable decision of the spam filter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Preiss</title>
		<link>http://hoopercharles.wordpress.com/2011/02/06/sql-performance-problem-awr-reports-query-is-1-in-elapsed-time-2-in-cpu-time-how-would-you-help/#comment-2788</link>
		<dc:creator><![CDATA[Martin Preiss]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 18:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4360#comment-2788</guid>
		<description><![CDATA[Charles,
perhaps the &quot;forst_rows_10&quot; hint suggested by Mr. B. would help ... (or should it be &quot;frost_rows_10&quot;?)
Indeed a strange query: even the string concatenation is weird:
[code]
&#039;DATAPOINT EXTENTS_LEFT &#039;  &#124;&#124; &#039; &#039; &#124;&#124;
[/code]
And I have no idea how MIN(DSE.MAXEXTS - DSE.EXTENTS) could be of any interest.

&lt;em&gt;(Sorry, I had to edit your comment - the original comment was blocked by the Akismet spam filter.)&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Charles,<br />
perhaps the &#8220;forst_rows_10&#8243; hint suggested by Mr. B. would help &#8230; (or should it be &#8220;frost_rows_10&#8243;?)<br />
Indeed a strange query: even the string concatenation is weird:</p>
<pre class="brush: plain; title: ; notranslate">
'DATAPOINT EXTENTS_LEFT '  || ' ' ||
</pre>
<p>And I have no idea how MIN(DSE.MAXEXTS &#8211; DSE.EXTENTS) could be of any interest.</p>
<p><em>(Sorry, I had to edit your comment &#8211; the original comment was blocked by the Akismet spam filter.)</em></p>
]]></content:encoded>
	</item>
</channel>
</rss>
