<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ora-solutions.net - Martin Decker &#187; Performance Tuning</title>
	<atom:link href="http://www.ora-solutions.net/web/category/oracle-database/performance-tuning-oracle-database-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ora-solutions.net/web</link>
	<description>Indepented Oracle consultant</description>
	<lastBuildDate>Wed, 25 Jan 2012 14:04:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Performance Degradation for Query on DBA_SEGMENTS.BYTES in 11gR2</title>
		<link>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/</link>
		<comments>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 14:21:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[11gR2]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=1085</guid>
		<description><![CDATA[I have been troubleshooting a performance issue in a DWH environment, which is quite interesting. It was a query on DBA_SEGMENTS in 11gR2 with lots of partitions and it was taking almost 10 minutes versus only a few seconds in 10gR2. The problem could be stripped downt to this SQL query:]]></description>
			<content:encoded><![CDATA[<p>I have been troubleshooting a performance issue in a DWH environment, which is quite interesting. It was a query on DBA_SEGMENTS in 11gR2 with lots of partitions and it was taking almost 10 minutes versus only a few seconds in 10gR2. The problem could be stripped downt to this SQL query:</p>
<pre lang=SQL">select bytes from dba_segments</pre>
<p>The dba_segment view can be seen in DBA_VIEWS:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">...</span>
       decode<span style="color: #66cc66;">&#40;</span>bitand<span style="color: #66cc66;">&#40;</span>segment_flags<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">131072</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">131072</span><span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">,</span>
           <span style="color: #66cc66;">&#40;</span>decode<span style="color: #66cc66;">&#40;</span>bitand<span style="color: #66cc66;">&#40;</span>segment_flags<span style="color: #66cc66;">,</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span>
            <span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span>dbms_space_admin<span style="color: #66cc66;">.</span>segment_number_blocks<span style="color: #66cc66;">&lt;/</span>strong<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span>tablespace_id<span style="color: #66cc66;">,</span> relative_fno<span style="color: #66cc66;">,</span>
            header_block<span style="color: #66cc66;">,</span> segment_type_id<span style="color: #66cc66;">,</span> buffer_pool_id<span style="color: #66cc66;">,</span> segment_flags<span style="color: #66cc66;">,</span>
            segment_objd<span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span>blocksize<span style="color: #66cc66;">,</span>
      <span style="color: #66cc66;">...</span>
<span style="color: #993333; font-weight: bold;">FROM</span> sys_dba_segs</pre></div></div>

<p>The response time was dominated by Waits for &#8220;db file sequential reads&#8221; taking almost all of the response time.</p>
<p><strong>11gR2:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch    12563     23.17     546.74     157447     580414          1      188421
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total    12565     23.17     546.74     157447     580414          1      188421</pre></div></div>

<p><strong>10gR2:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.06       0.06          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch     5104      1.77       2.54          0      96688          0       76542
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total     5106      1.83       2.61          0      96688          0       76542</pre></div></div>

<p>The 10046 Trace File contains more data regarding those waits:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">WAIT #4: nam='db file sequential read' ela= 134 file#=21 block#=2313482 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 120 file#=15 block#=2128019 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 128 file#=21 block#=2313490 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 372 file#=21 block#=2313498 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 108 file#=21 block#=2313506 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 130 file#=21 block#=2313514 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 132 file#=21 block#=2313522 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 121 file#=21 block#=2313530 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 158 file#=15 block#=2128003 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 146 file#=21 block#=2313538 blocks=1 obj#=-1 
WAIT #4: nam='db file sequential read' ela= 116 file#=21 block#=2313546 blocks=1 obj#=-1 
(Output modified for formatting)</pre></div></div>

<p>Strange thing that obj# is -1. I made some block dumps of those blocks and found out that all those blocks (file#/block#) have something in common: They were all segment header blocks. Another strange thing was that when the query was executed a second time, all those I/O requests were performed again &#8211; so no caching. </p>
<p>At that point, I opened a Support service request. After a couple of weeks, Support suggested running this for each tablespace of the user segments:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">exec  dbms_space_admin<span style="color: #66cc66;">.</span>TABLESPACE_FIX_SEGMENT_EXTBLKS<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;tablespace_name&gt;'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Finally this fixed the problem. Now, we are trying to find out why this was necessary for a database, that was freshly created with dbca 11.2.0.2 from the seeded template and filled with data pump import.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2011/07/18/performance-degradation-for-query-on-dba_segments-bytes-in-11gr2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reclaimable Space Report &#8211; Segment Advisor</title>
		<link>http://www.ora-solutions.net/web/2009/05/14/reclaimable-space-report-segment-advisor/</link>
		<comments>http://www.ora-solutions.net/web/2009/05/14/reclaimable-space-report-segment-advisor/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:49:56 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle Enterprise Manager]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=674</guid>
		<description><![CDATA[Today, I tried to get a nice, clean report about objects with reclaimable space from Segment Advisor. It is no problem to display the list in Enterprise Manager Grid&#124;DB Control, but it is not so easy in SQL*Plus. This is what i ended up with: SELECT segment_owner , segment_name, round(allocated_space/1024/1024) ALLOC_MB , round(used_space/1024/1024) USED_MB , [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I tried to get a nice, clean report about objects with reclaimable space from Segment Advisor. It is no problem to display the list in Enterprise Manager Grid|DB Control, but it is not so easy in SQL*Plus.</p>
<p>This is what i ended up with:</p>
<blockquote>
<pre>
 SELECT
  segment_owner ,
  segment_name,
  round(allocated_space/1024/1024) ALLOC_MB ,
  round(used_space/1024/1024) USED_MB ,
  round(reclaimable_space/1024/1024) RECLAIM_MB    ,
  (1-ROUND((used_space/allocated_space),2))*100 AS reclaim_pct
   FROM TABLE(dbms_space.asa_recommendations('TRUE', 'TRUE', 'FALSE'))
  WHERE tablespace_name IN ('TS_DATA')
AND segment_type         = 'TABLE'
AND segment_owner LIKE '%'
AND segment_name LIKE '%'
AND (reclaimable_space >= 1000000
         OR (((1-ROUND((used_space/allocated_space),2))*100)) > 30)
ORDER BY reclaimable_space DESC
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/05/14/reclaimable-space-report-segment-advisor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your experience with RAC Dynamic Remastering (DRM) in 10gR2?</title>
		<link>http://www.ora-solutions.net/web/2009/05/12/your-experience-with-rac-dynamic-remastering-drm-in-10gr2/</link>
		<comments>http://www.ora-solutions.net/web/2009/05/12/your-experience-with-rac-dynamic-remastering-drm-in-10gr2/#comments</comments>
		<pubDate>Tue, 12 May 2009 14:37:48 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Itanium]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Real Application Clusters]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=662</guid>
		<description><![CDATA[One of my customers is having severe RAC performance issues, which appeared a dozen times so far. Each time, the performance impact lasted around 10 minutes and caused basically a hang of the application. ASH investigation revealed that the time frame of performance issues exactly matches a DRM operation of the biggest segment of the [...]]]></description>
			<content:encoded><![CDATA[<p>One of my customers is having severe RAC performance issues, which appeared a dozen times so far. Each time, the performance impact lasted around 10 minutes and caused basically a hang of the application. ASH investigation revealed that the time frame of performance issues exactly matches a DRM operation of the biggest segment of the database. During the problematic time period, there are 20-50 instead of 5-10 active sessions and they are mostly waiting for gc related events: &#8220;gc buffer busy&#8221;,&#8221;gc cr block busy&#8221;, &#8220;gc cr block 2-way&#8221;, &#8220;gc current block 2-way&#8221;, &#8220;gc current request&#8221;, &#8220;gc current grant busy&#8221;, etc.</p>
<p>In addition, there is one single session which has wait event &#8220;<strong>kjbdrmcvtq lmon drm quiesce: ping completion</strong>&#8221; (on instance 1) and 1-3 sessions with wait event &#8220;<strong>gc remaster</strong>&#8220;. (on instance 2) The cur_obj# of the session waiting on &#8220;gc remaster&#8221; is pointing to the segment being remastered.</p>
<p>Does anybody have any experience with DRM problems with 10.2.0.4 on Linux Itanium?</p>
<p>I know that it is possible to deactive DRM, but usually it should be beneficial to have it enabled. I could not find any reports of performance impact during DRM operation on metalink. Support is involved but clueless so far.</p>
<p>Regards,<br />
Martin</p>
<p><a href="http://forums.oracle.com/forums/message.jspa?messageID=3447436#3447436">http://forums.oracle.com/forums/message.jspa?messageID=3447436#3447436</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/05/12/your-experience-with-rac-dynamic-remastering-drm-in-10gr2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SQL Profiler TVD$XTAT update available</title>
		<link>http://www.ora-solutions.net/web/2008/11/27/sql-profiler-tvdxtat-available/</link>
		<comments>http://www.ora-solutions.net/web/2008/11/27/sql-profiler-tvdxtat-available/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 19:21:22 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[9iR2]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=389</guid>
		<description><![CDATA[I just saw that Christian Antognini has released an update of TVD$XTAT. I am looking forward to experimenting with it. If you used tkprof in the past, you should definitely take a look at this tool.]]></description>
			<content:encoded><![CDATA[<p>I just saw that Christian Antognini has released an update of <a href="http://antognini.ch/2008/11/tvdxtat-40-beta-8/">TVD$XTAT</a>.  I am looking forward to experimenting with it. If you used tkprof in the past, you should definitely take a look at this tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2008/11/27/sql-profiler-tvdxtat-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excellent Presentations on</title>
		<link>http://www.ora-solutions.net/web/2008/11/16/excellent-presentations-on/</link>
		<comments>http://www.ora-solutions.net/web/2008/11/16/excellent-presentations-on/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 18:27:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Real Application Clusters]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=443</guid>
		<description><![CDATA[The database specialist Riyaj Shamsudeen from The Pythian Group has published some excellent presentations on his blog. Don´t miss it!]]></description>
			<content:encoded><![CDATA[<p>The database specialist Riyaj Shamsudeen from The Pythian Group has published some <a href="http://www.pythian.com/blogs/1330/riyajs-presentations-at-sioug-and-doug">excellent presentations</a> on his blog. Don´t miss it! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2008/11/16/excellent-presentations-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online Redefinition on Mission Critical Siebel database</title>
		<link>http://www.ora-solutions.net/web/2008/10/26/online-redefinition-on-mission-critical-siebel-database/</link>
		<comments>http://www.ora-solutions.net/web/2008/10/26/online-redefinition-on-mission-critical-siebel-database/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 00:39:04 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=428</guid>
		<description><![CDATA[I have documented a successful online redefinition operation on a mission-critical Siebel database. It was performed after a big portion of the rows have been deleted. Additionally, row chaining was removed. The paper can be found in the &#8220;papers&#8221; section or downloaded here:]]></description>
			<content:encoded><![CDATA[<p>I have documented a successful online redefinition operation on a mission-critical Siebel database. It was performed after a big portion of the rows have been deleted. Additionally, row chaining was removed.</p>
<p>The paper can be found in the <a href="/web/papers/">&#8220;papers&#8221;</a> section or downloaded here: <a class="downloadlink" href="http://www.ora-solutions.net/web/wp-content/plugins/download-monitor/download.php?id=21" title="Version 1.0 downloaded 3749 times" >Online Reorganisation with DBMS_REDEFINITION</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2008/10/26/online-redefinition-on-mission-critical-siebel-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

