<?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: heap block compress</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Fri, 24 May 2013 13:27:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Compression in Oracle – Part 3: OLTP Compression &#8211; All Things Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-53305</link>
		<dc:creator><![CDATA[Compression in Oracle – Part 3: OLTP Compression &#8211; All Things Oracle]]></dc:creator>
		<pubDate>Thu, 31 Jan 2013 13:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-53305</guid>
		<description><![CDATA[[...] If you delete a few rows from a block, or update a few rows so that they become longer and have to be moved into the free space gap, you leave holes in the row heap. If Oracle needs to do something that requires more space than is currently in the free space gap it can re-arrange the contents of the block, moving the rows downwards to the end of the block (adjusting the row directory as it does so) so that all the holes “bubble up” into the free space gap. This is the action recorded as a “heap block compress”. This also explain why a block dump shows two measures of free space, the “tosp” (total space free in block) and the “avsp” (available space in the free space gap) – ignoring a couple of anomalies the tosp is the avsp plus the sum of all the little holes. (see also: jonathanlewis.wordpress.com/2010/03/30/heap-block-compress) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] If you delete a few rows from a block, or update a few rows so that they become longer and have to be moved into the free space gap, you leave holes in the row heap. If Oracle needs to do something that requires more space than is currently in the free space gap it can re-arrange the contents of the block, moving the rows downwards to the end of the block (adjusting the row directory as it does so) so that all the holes “bubble up” into the free space gap. This is the action recorded as a “heap block compress”. This also explain why a block dump shows two measures of free space, the “tosp” (total space free in block) and the “avsp” (available space in the free space gap) – ignoring a couple of anomalies the tosp is the avsp plus the sum of all the little holes. (see also: jonathanlewis.wordpress.com/2010/03/30/heap-block-compress) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-36841</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 24 Jul 2010 11:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-36841</guid>
		<description><![CDATA[Flado,

I&#039;ve just discovered that I didn&#039;t reply to your question.

Your guess was correct - I wasn&#039;t expecting to see any change, but I thought I&#039;d put in the code to check anyway since it was just a couple more lines. 

Your thought about a second transaction is interesting, though. It would need to start with two active transactions on the block (INITRANS=2 by default), but it&#039;s possible that a third transaction would be able to see free space in the block and need to compress the block because it had to push down the row directory to allow space to create a third ITL entry before it could delete a row.]]></description>
		<content:encoded><![CDATA[<p>Flado,</p>
<p>I&#8217;ve just discovered that I didn&#8217;t reply to your question.</p>
<p>Your guess was correct &#8211; I wasn&#8217;t expecting to see any change, but I thought I&#8217;d put in the code to check anyway since it was just a couple more lines. </p>
<p>Your thought about a second transaction is interesting, though. It would need to start with two active transactions on the block (INITRANS=2 by default), but it&#8217;s possible that a third transaction would be able to see free space in the block and need to compress the block because it had to push down the row directory to allow space to create a third ITL entry before it could delete a row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report 26/03 /2010 &#8211; 02/04/2010 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-36309</link>
		<dc:creator><![CDATA[Blogroll Report 26/03 /2010 &#8211; 02/04/2010 &#171; Coskan&#8217;s Approach to Oracle]]></dc:creator>
		<pubDate>Sun, 23 May 2010 22:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-36309</guid>
		<description><![CDATA[[...] 4-How does heap block compress statistics increase and what happens when there is space but not at the top of the free space heap? Jonathan Lewis&#8211; Heap Block Compress [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 4-How does heap block compress statistics increase and what happens when there is space but not at the top of the free space heap? Jonathan Lewis&#8211; Heap Block Compress [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-36125</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 02 May 2010 10:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-36125</guid>
		<description><![CDATA[Stefan,

Rows will keep their rowid which, in other words, means that a row cannot change the row directory entry that it&#039;s stored in. This does have a notable side effect.  In my article on the &lt;a href=&quot;http://jonathanlewis.wordpress.com/2009/05/21/row-directory/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;row directory&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; I showed a block with 2017 entries in the row directory, of which the first 2016 pointed to row stubs that had been marked for deletion. When the session commits the space from the delete rows can be reclaimed in a (future) heap block compress. Similarly space from the row directory can be reclaimed - within limits.

If row 2016 had not been deleted, then the heap block compress would not be able to reclaim any space from the row directory.  If it was just row 1,000 that had not been deleted then the heap block compress could reclaim the row directory entries from 1001 to 2016. There&#039;s a type of &quot;high watermark&quot; effect - a row has to stay in the same row directory entry so you can only reclaim row directory space for row entries larger than the largest remaining row.]]></description>
		<content:encoded><![CDATA[<p>Stefan,</p>
<p>Rows will keep their rowid which, in other words, means that a row cannot change the row directory entry that it&#8217;s stored in. This does have a notable side effect.  In my article on the <a href="http://jonathanlewis.wordpress.com/2009/05/21/row-directory/" rel="nofollow"><em><strong>row directory</strong></em></a> I showed a block with 2017 entries in the row directory, of which the first 2016 pointed to row stubs that had been marked for deletion. When the session commits the space from the delete rows can be reclaimed in a (future) heap block compress. Similarly space from the row directory can be reclaimed &#8211; within limits.</p>
<p>If row 2016 had not been deleted, then the heap block compress would not be able to reclaim any space from the row directory.  If it was just row 1,000 that had not been deleted then the heap block compress could reclaim the row directory entries from 1001 to 2016. There&#8217;s a type of &#8220;high watermark&#8221; effect &#8211; a row has to stay in the same row directory entry so you can only reclaim row directory space for row entries larger than the largest remaining row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-36080</link>
		<dc:creator><![CDATA[Stefan]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 12:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-36080</guid>
		<description><![CDATA[Hello Jonathan,
great blog article.

In your proof the &quot;heap block compression&quot; occurs on a block where only the last row is still present (row 19 in your case). 
If oracle &quot;rewrites&quot; the whole block in such cases, what would happen to rows that still exist in the middle (let&#039;s say that row 10 would also exist).

As the ROWID also contains the &quot;row number&quot; - will such a compression also change the rowid or do the rows always keep their &quot;row number&quot;.

Regards
Stefan]]></description>
		<content:encoded><![CDATA[<p>Hello Jonathan,<br />
great blog article.</p>
<p>In your proof the &#8220;heap block compression&#8221; occurs on a block where only the last row is still present (row 19 in your case).<br />
If oracle &#8220;rewrites&#8221; the whole block in such cases, what would happen to rows that still exist in the middle (let&#8217;s say that row 10 would also exist).</p>
<p>As the ROWID also contains the &#8220;row number&#8221; &#8211; will such a compression also change the rowid or do the rows always keep their &#8220;row number&#8221;.</p>
<p>Regards<br />
Stefan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flado</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-35958</link>
		<dc:creator><![CDATA[Flado]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 07:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-35958</guid>
		<description><![CDATA[Jonathan,
What lead you to believe that a DELETE may bump the &quot;heap block compress&quot; statistic? In other words, what&#039;s the purpose of the heap_comp2 variable? My guess is, you just wanted to confirm this does not, in fact, happen - but is there a non-obvious reason to suspect a DELETE might trigger a block compact operation? Maybe if it was coming from another transaction thus requiring a new ITL slot, but your test was single-session...

Thanks,
Flado]]></description>
		<content:encoded><![CDATA[<p>Jonathan,<br />
What lead you to believe that a DELETE may bump the &#8220;heap block compress&#8221; statistic? In other words, what&#8217;s the purpose of the heap_comp2 variable? My guess is, you just wanted to confirm this does not, in fact, happen &#8211; but is there a non-obvious reason to suspect a DELETE might trigger a block compact operation? Maybe if it was coming from another transaction thus requiring a new ITL slot, but your test was single-session&#8230;</p>
<p>Thanks,<br />
Flado</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Index too big &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/30/heap-block-compress/#comment-35953</link>
		<dc:creator><![CDATA[Index too big &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 22:17:10 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3450#comment-35953</guid>
		<description><![CDATA[[...] how often, in my test case does Oracle remove the actual rows and replace them with stubs ? (See &#8220;Heap Block Compress&#8221; for [...]]]></description>
		<content:encoded><![CDATA[<p>[...] how often, in my test case does Oracle remove the actual rows and replace them with stubs ? (See &#8220;Heap Block Compress&#8221; for [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
