<?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: Index Analysis 2</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Tue, 18 Jun 2013 17:11:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-36447</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 08 Jun 2010 21:54:21 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-36447</guid>
		<description><![CDATA[maclean,
Thanks for the follow-up.]]></description>
		<content:encoded><![CDATA[<p>maclean,<br />
Thanks for the follow-up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maclean</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-36438</link>
		<dc:creator><![CDATA[maclean]]></dc:creator>
		<pubDate>Mon, 07 Jun 2010 05:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-36438</guid>
		<description><![CDATA[Recently i have tested this bug on version 11.2.0.1 , still not fixed.
Maybe Oracle Development department persisted in this index leaf split behavior is right; Saving  space is important than a little index contention delay?]]></description>
		<content:encoded><![CDATA[<p>Recently i have tested this bug on version 11.2.0.1 , still not fixed.<br />
Maybe Oracle Development department persisted in this index leaf split behavior is right; Saving  space is important than a little index contention delay?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Cotsonas</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35321</link>
		<dc:creator><![CDATA[Erik Cotsonas]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 19:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35321</guid>
		<description><![CDATA[Yes, I saw that.  I have applied patch 8286901 and set the event for version 10.2.0.4, but the problem still occurs periodically.  And as I mentioned before, we see a correlation between enq TX waits and the failed probes on index block reclamation.  Which is why I still think that it is a bug.  I agree that trying to rebuild or coalesce the indexes are simply attempts to workaround the issue and not solve the root cause. 

Early on when I started on this issue I did do some index dumps and could clearly see that we had lots of blocks with only 1 or 2 records after our mass delete jobs.  I have provided Oracle Support with this information as well as oradump files while the problem is occurring, but they don&#039;t seem to be able to find anything wrong so far. 

If you are interested in seeing if you are experiencing a high &#039;failed probes on index block reclamation&#039; event run the query below.

select SS.snap_id,
SS.stat_name,
TO_CHAR(S.BEGIN_INTERVAL_TIME, &#039;DAY&#039;) DAY,
S.BEGIN_INTERVAL_TIME,
S.END_INTERVAL_TIME,
SS.value,
SS.value - LAG(SS.VALUE, 1, ss.value) OVER (ORDER BY SS.SNAP_ID) AS DIFF
from DBA_HIST_SYSSTAT SS,
DBA_HIST_SNAPSHOT S
where S.SNAP_ID = SS.SNAP_ID
AND SS.stat_NAME = &#039;failed probes on index block reclamation&#039;
ORDER BY SS.SNAP_ID ;]]></description>
		<content:encoded><![CDATA[<p>Yes, I saw that.  I have applied patch 8286901 and set the event for version 10.2.0.4, but the problem still occurs periodically.  And as I mentioned before, we see a correlation between enq TX waits and the failed probes on index block reclamation.  Which is why I still think that it is a bug.  I agree that trying to rebuild or coalesce the indexes are simply attempts to workaround the issue and not solve the root cause. </p>
<p>Early on when I started on this issue I did do some index dumps and could clearly see that we had lots of blocks with only 1 or 2 records after our mass delete jobs.  I have provided Oracle Support with this information as well as oradump files while the problem is occurring, but they don&#8217;t seem to be able to find anything wrong so far. </p>
<p>If you are interested in seeing if you are experiencing a high &#8216;failed probes on index block reclamation&#8217; event run the query below.</p>
<p>select SS.snap_id,<br />
SS.stat_name,<br />
TO_CHAR(S.BEGIN_INTERVAL_TIME, &#8216;DAY&#8217;) DAY,<br />
S.BEGIN_INTERVAL_TIME,<br />
S.END_INTERVAL_TIME,<br />
SS.value,<br />
SS.value &#8211; LAG(SS.VALUE, 1, ss.value) OVER (ORDER BY SS.SNAP_ID) AS DIFF<br />
from DBA_HIST_SYSSTAT SS,<br />
DBA_HIST_SNAPSHOT S<br />
where S.SNAP_ID = SS.SNAP_ID<br />
AND SS.stat_NAME = &#8216;failed probes on index block reclamation&#8217;<br />
ORDER BY SS.SNAP_ID ;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35320</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35320</guid>
		<description><![CDATA[There is another interesting little note under bug number 8286901, which says a similar type of bug (possibly the same one) is fixed in 11.2 - had you seen that ?]]></description>
		<content:encoded><![CDATA[<p>There is another interesting little note under bug number 8286901, which says a similar type of bug (possibly the same one) is fixed in 11.2 &#8211; had you seen that ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35318</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35318</guid>
		<description><![CDATA[maclean,

It&#039;s not a good idea to use &quot;analyze index validate structure&quot; on a production index as the command locks the underlying table. It&#039;s also not very useful for your test case, since all it gives is average stats, and you need more detail.  For testing, you might like to check the effects of a &lt;a href=&quot;http://jonathanlewis.wordpress.com/2009/08/17/treedump/&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;treedump&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; (on your little test case first) as this will tell you which blocks are still part of the index structure, and how many rows are in each.]]></description>
		<content:encoded><![CDATA[<p>maclean,</p>
<p>It&#8217;s not a good idea to use &#8220;analyze index validate structure&#8221; on a production index as the command locks the underlying table. It&#8217;s also not very useful for your test case, since all it gives is average stats, and you need more detail.  For testing, you might like to check the effects of a <a href="http://jonathanlewis.wordpress.com/2009/08/17/treedump/" rel="nofollow"><em><strong>treedump</strong></em></a> (on your little test case first) as this will tell you which blocks are still part of the index structure, and how many rows are in each.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Cotsonas</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35317</link>
		<dc:creator><![CDATA[Erik Cotsonas]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 14:55:44 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35317</guid>
		<description><![CDATA[I still have a case open with Oracle.  I believe that this is a bug in the Oracle code.  The problem is that it has been difficult to create a reproducible test case for Oracle support.  My specific issue was basically put on hold pending the results of another customer&#039;s service request that appeared to have had the same issue, (9034788).  Unfortunately they couldn&#039;t reproduce the issue in that case either.  

I believe that there is a correlation between the enq TX - index contention wait event and a spike in the number of &#039;failed probes on index block reclamation.  I have specifically asked Oracle to explain why there is a spike in the &#039;failed probes on index block reclamation&#039; during the same time frame as the enq TX index contention wait event, but they have not answered my question.

I was hoping that some investigation by Oracle Support into the failed probes metric might get someone on the right track to discovering the bug.  That hasn&#039;t happened though.]]></description>
		<content:encoded><![CDATA[<p>I still have a case open with Oracle.  I believe that this is a bug in the Oracle code.  The problem is that it has been difficult to create a reproducible test case for Oracle support.  My specific issue was basically put on hold pending the results of another customer&#8217;s service request that appeared to have had the same issue, (9034788).  Unfortunately they couldn&#8217;t reproduce the issue in that case either.  </p>
<p>I believe that there is a correlation between the enq TX &#8211; index contention wait event and a spike in the number of &#8216;failed probes on index block reclamation.  I have specifically asked Oracle to explain why there is a spike in the &#8216;failed probes on index block reclamation&#8217; during the same time frame as the enq TX index contention wait event, but they have not answered my question.</p>
<p>I was hoping that some investigation by Oracle Support into the failed probes metric might get someone on the right track to discovering the bug.  That hasn&#8217;t happened though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maclean</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35315</link>
		<dc:creator><![CDATA[maclean]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 08:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35315</guid>
		<description><![CDATA[hello ,
  i have read the bug note; But there is no solution advised.
  Can you share your experience with this issue?]]></description>
		<content:encoded><![CDATA[<p>hello ,<br />
  i have read the bug note; But there is no solution advised.<br />
  Can you share your experience with this issue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maclean</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35314</link>
		<dc:creator><![CDATA[maclean]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 08:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35314</guid>
		<description><![CDATA[Hi Jonathan,
       That’s great for your advise . I realize that I should not use dbms_space package to estimate the index but analyze index validate structure.
       But Oracle behave with index split is so unsatisfactory. I will test it on 11g r2.
       Thx for your help again.]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan,<br />
       That’s great for your advise . I realize that I should not use dbms_space package to estimate the index but analyze index validate structure.<br />
       But Oracle behave with index split is so unsatisfactory. I will test it on 11g r2.<br />
       Thx for your help again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35310</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 24 Jan 2010 21:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35310</guid>
		<description><![CDATA[Maclean,

As you can see from this posting, and from &lt;a href=&quot;http://sai-oracle.blogspot.com/2009/04/beware-of-index-contention-after-mass.html&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;a related posting&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; mentioned in comment 3 above, there are at least two reasons why you could see &lt;em&gt;&quot;Enq TX: index contention&quot;&lt;/em&gt; if you do large deletes; and the advice to deal with the two different problems depends very strongly on which problem you are seeing.

I hope that the Oracle support consultant explained why the coalesce might help - and pointed out the bits of information in your SR that took him to that conclusion. 

As far as your example is concerned the most important point is that it&#039;s irrelevant if it isn&#039;t a good match for your production scenario - do you really delete every other row from a large sequential section of your data; do you even get to a position where a number of deletions over a period of days leaves your data in that pattern ? 

A couple of comments on your results:

The first &quot;no &lt;em&gt;change&quot;&lt;/em&gt; after deleting 25% of the data is probably because you hadn&#039;t issued a commit at that point.

The &lt;em&gt;&quot;free blocks increased&quot;&lt;/em&gt; after the first coalesce doesn&#039;t match the perfect scenario - which would have been about 30 at full, and about 10 at FS1 - but the timing for bits being set and cleared in ASSM is an ongoing problem with Oracle and changes with version. We hope for some blocks to be cleared, though, because you have made a number of adjacent leaf blocks half empty, so some of those should be emptied and their contents combined with the next leaf block (i.e. instead of 20 half full blocks you hope to see 10 empty and 10 full).

The &lt;em&gt;&quot;free blocks increased again&quot;&lt;/em&gt;. You&#039;ve deleted the rest of the top half of the index and committed (and the bitmaps have been updated). So where you have approximatly 40 full leaf blocks you now have 20 full and 20 empty.

The &quot;after coalesce, nothing changed&quot;. Because you didn&#039;t have any partly empty leaf blocks that could be the subject of a coalesce.

After rebuild - you had a significant difference in the FS2 and Full blocks: but I&#039;d be inclined to put that down to the weakness of the ASSM bitmap updates combined with the way in which the &lt;strong&gt;pctfree &lt;/strong&gt;setting for indexes works - not to mention a couple of little oddities that show up when you&#039;re dealing with small indexes. If you want to analyse exactly what&#039;s going on you need to do a load of block dumps of the bitmap blocks and the index blocks as you work.

To answer your questions:
The free blocks increase after the &lt;strong&gt;coalesce &lt;/strong&gt;because that&#039;s what the coalesce command is designed to do: free up blocks which can be made free. More significantly, though, it&#039;s supposed to take completely empty blocks out of the index structure and the nasty thing about your example is that it suggests that none of the index leaf blocks has become empty when clearly they should have been.  You need to do some block dumps to find out whether this is just a defect in the bitmap report, or whether the blocks really are still in the index structure even though they are empty.

The coalesce MAY resolve the contention if the contention is caused by the behaviour described in my posting. But if the coalesce is leaving empty blocks in the index structure then it MAY have no beneficial effect whatsoever.

The coalesce command does not lock the table.]]></description>
		<content:encoded><![CDATA[<p>Maclean,</p>
<p>As you can see from this posting, and from <a href="http://sai-oracle.blogspot.com/2009/04/beware-of-index-contention-after-mass.html" rel="nofollow"><em><strong>a related posting</strong></em></a> mentioned in comment 3 above, there are at least two reasons why you could see <em>&#8220;Enq TX: index contention&#8221;</em> if you do large deletes; and the advice to deal with the two different problems depends very strongly on which problem you are seeing.</p>
<p>I hope that the Oracle support consultant explained why the coalesce might help &#8211; and pointed out the bits of information in your SR that took him to that conclusion. </p>
<p>As far as your example is concerned the most important point is that it&#8217;s irrelevant if it isn&#8217;t a good match for your production scenario &#8211; do you really delete every other row from a large sequential section of your data; do you even get to a position where a number of deletions over a period of days leaves your data in that pattern ? </p>
<p>A couple of comments on your results:</p>
<p>The first &#8220;no <em>change&#8221;</em> after deleting 25% of the data is probably because you hadn&#8217;t issued a commit at that point.</p>
<p>The <em>&#8220;free blocks increased&#8221;</em> after the first coalesce doesn&#8217;t match the perfect scenario &#8211; which would have been about 30 at full, and about 10 at FS1 &#8211; but the timing for bits being set and cleared in ASSM is an ongoing problem with Oracle and changes with version. We hope for some blocks to be cleared, though, because you have made a number of adjacent leaf blocks half empty, so some of those should be emptied and their contents combined with the next leaf block (i.e. instead of 20 half full blocks you hope to see 10 empty and 10 full).</p>
<p>The <em>&#8220;free blocks increased again&#8221;</em>. You&#8217;ve deleted the rest of the top half of the index and committed (and the bitmaps have been updated). So where you have approximatly 40 full leaf blocks you now have 20 full and 20 empty.</p>
<p>The &#8220;after coalesce, nothing changed&#8221;. Because you didn&#8217;t have any partly empty leaf blocks that could be the subject of a coalesce.</p>
<p>After rebuild &#8211; you had a significant difference in the FS2 and Full blocks: but I&#8217;d be inclined to put that down to the weakness of the ASSM bitmap updates combined with the way in which the <strong>pctfree </strong>setting for indexes works &#8211; not to mention a couple of little oddities that show up when you&#8217;re dealing with small indexes. If you want to analyse exactly what&#8217;s going on you need to do a load of block dumps of the bitmap blocks and the index blocks as you work.</p>
<p>To answer your questions:<br />
The free blocks increase after the <strong>coalesce </strong>because that&#8217;s what the coalesce command is designed to do: free up blocks which can be made free. More significantly, though, it&#8217;s supposed to take completely empty blocks out of the index structure and the nasty thing about your example is that it suggests that none of the index leaf blocks has become empty when clearly they should have been.  You need to do some block dumps to find out whether this is just a defect in the bitmap report, or whether the blocks really are still in the index structure even though they are empty.</p>
<p>The coalesce MAY resolve the contention if the contention is caused by the behaviour described in my posting. But if the coalesce is leaving empty blocks in the index structure then it MAY have no beneficial effect whatsoever.</p>
<p>The coalesce command does not lock the table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maclean</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/29/index-analysis-2/#comment-35279</link>
		<dc:creator><![CDATA[maclean]]></dc:creator>
		<pubDate>Fri, 22 Jan 2010 12:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=547#comment-35279</guid>
		<description><![CDATA[Hi ,
  My customer has a problem with wait event TX:index cotention. Oracle support suggest we should coalesce or reuild the index.
  Coalesce is less resource sensitive ,So i&#039;d like to using coalesce.
  But as flow test:
[sourcecode]
  19:46:45 SQL&gt; create table test(t1 int) tablespace datatb;

 Table created.
SQL&gt; create index ind_t1 on test(t1);

  Index created.

Elapsed: 00:00:00.01
19:47:08 SQL&gt; begin
19:47:17   2    for i in 1..20000 loop
19:47:17   3      insert into test values(i);
19:47:17   4      commit;
19:47:17   5      end loop;
19:47:17   6      end;
19:47:18   7  /

PL/SQL procedure successfully completed.
SQL&gt; set serveroutput on;
SQL&gt; declare
  2 
  3     l_fs1_bytes number;
  4     l_fs2_bytes number;
  5     l_fs3_bytes number;
  6     l_fs4_bytes number;
  7     l_fs1_blocks number;
  8     l_fs2_blocks number;
  9     l_fs3_blocks number;
 10     l_fs4_blocks number;
 11     l_full_bytes number;
 12     l_full_blocks number;
 13     l_unformatted_bytes number;
 14     l_unformatted_blocks number;
 15  begin
 16     dbms_space.space_usage(
 17        segment_owner      =&gt; user,
 18        segment_name       =&gt; &#039;IND_T1&#039;,
 19        segment_type       =&gt; &#039;INDEX&#039;,
 20        fs1_bytes          =&gt; l_fs1_bytes,
 21        fs1_blocks         =&gt; l_fs1_blocks,
 22        fs2_bytes          =&gt; l_fs2_bytes,
 23        fs2_blocks         =&gt; l_fs2_blocks,
 24        fs3_bytes          =&gt; l_fs3_bytes,
 25        fs3_blocks         =&gt; l_fs3_blocks,
 26        fs4_bytes          =&gt; l_fs4_bytes,
 27        fs4_blocks         =&gt; l_fs4_blocks,
 28        full_bytes         =&gt; l_full_bytes,
 29        full_blocks        =&gt; l_full_blocks,
 30        unformatted_blocks =&gt; l_unformatted_blocks,
 31        unformatted_bytes  =&gt; l_unformatted_bytes
 32     );
 33     dbms_output.put_line(&#039; FS1 Blocks = &#039;&#124;&#124;l_fs1_blocks&#124;&#124;&#039; Bytes = &#039;&#124;&#124;l_fs1_bytes);
 34     dbms_output.put_line(&#039; FS2 Blocks = &#039;&#124;&#124;l_fs2_blocks&#124;&#124;&#039; Bytes = &#039;&#124;&#124;l_fs2_bytes);
 35     dbms_output.put_line(&#039; FS3 Blocks = &#039;&#124;&#124;l_fs3_blocks&#124;&#124;&#039; Bytes = &#039;&#124;&#124;l_fs3_bytes);
 36     dbms_output.put_line(&#039; FS4 Blocks = &#039;&#124;&#124;l_fs4_blocks&#124;&#124;&#039; Bytes = &#039;&#124;&#124;l_fs4_bytes);
 37     dbms_output.put_line(&#039;Full Blocks = &#039;&#124;&#124;l_full_blocks&#124;&#124;&#039; Bytes = &#039;&#124;&#124;l_full_bytes);
 38  end;
 39  /
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 4 Bytes = 32768
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 39 Bytes = 319488

PL/SQL procedure successfully completed.

Full blocks number is 39 ; fs2 is 4

SQL&gt; delete test where t1&gt;10000 and (mod(t1,2)!=0);

5000 rows deleted.
Now :
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 4 Bytes = 32768
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 39 Bytes = 319488
nothing changed .

SQL&gt; alter index ind_t1 coalesce;  

Index altered.
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 13 Bytes = 106496
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 30 Bytes = 245760

the free blocks increased

SQL&gt; delete test where t1&gt;10000;

5000 rows deleted.

SQL&gt; commit;

Commit complete.

Now :
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 23 Bytes = 188416
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 20 Bytes = 163840
after full block delete ,the free blocks increased again.

SQL&gt; alter index ind_t1 coalesce;

Index altered.

after coalesc , nothing changed:
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 23 Bytes = 188416
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 20 Bytes = 163840

but rebuild:
SQL&gt; alter index ind_t1 rebuild;

Index altered.
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 1 Bytes = 8192
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 21 Bytes = 172032
[/sourcecode]

what i want to ask, why the free blocks increased after coalesce? Can coalesce really resolve tx:index contention? If coalesce will lock table?]]></description>
		<content:encoded><![CDATA[<p>Hi ,<br />
  My customer has a problem with wait event TX:index cotention. Oracle support suggest we should coalesce or reuild the index.<br />
  Coalesce is less resource sensitive ,So i&#8217;d like to using coalesce.<br />
  But as flow test:</p>
<pre class="brush: plain; title: ; notranslate">
  19:46:45 SQL&amp;gt; create table test(t1 int) tablespace datatb;

 Table created.
SQL&amp;gt; create index ind_t1 on test(t1);

  Index created.

Elapsed: 00:00:00.01
19:47:08 SQL&amp;gt; begin
19:47:17   2    for i in 1..20000 loop
19:47:17   3      insert into test values(i);
19:47:17   4      commit;
19:47:17   5      end loop;
19:47:17   6      end;
19:47:18   7  /

PL/SQL procedure successfully completed.
SQL&amp;gt; set serveroutput on;
SQL&amp;gt; declare
  2 
  3     l_fs1_bytes number;
  4     l_fs2_bytes number;
  5     l_fs3_bytes number;
  6     l_fs4_bytes number;
  7     l_fs1_blocks number;
  8     l_fs2_blocks number;
  9     l_fs3_blocks number;
 10     l_fs4_blocks number;
 11     l_full_bytes number;
 12     l_full_blocks number;
 13     l_unformatted_bytes number;
 14     l_unformatted_blocks number;
 15  begin
 16     dbms_space.space_usage(
 17        segment_owner      =&amp;gt; user,
 18        segment_name       =&amp;gt; 'IND_T1',
 19        segment_type       =&amp;gt; 'INDEX',
 20        fs1_bytes          =&amp;gt; l_fs1_bytes,
 21        fs1_blocks         =&amp;gt; l_fs1_blocks,
 22        fs2_bytes          =&amp;gt; l_fs2_bytes,
 23        fs2_blocks         =&amp;gt; l_fs2_blocks,
 24        fs3_bytes          =&amp;gt; l_fs3_bytes,
 25        fs3_blocks         =&amp;gt; l_fs3_blocks,
 26        fs4_bytes          =&amp;gt; l_fs4_bytes,
 27        fs4_blocks         =&amp;gt; l_fs4_blocks,
 28        full_bytes         =&amp;gt; l_full_bytes,
 29        full_blocks        =&amp;gt; l_full_blocks,
 30        unformatted_blocks =&amp;gt; l_unformatted_blocks,
 31        unformatted_bytes  =&amp;gt; l_unformatted_bytes
 32     );
 33     dbms_output.put_line(' FS1 Blocks = '||l_fs1_blocks||' Bytes = '||l_fs1_bytes);
 34     dbms_output.put_line(' FS2 Blocks = '||l_fs2_blocks||' Bytes = '||l_fs2_bytes);
 35     dbms_output.put_line(' FS3 Blocks = '||l_fs3_blocks||' Bytes = '||l_fs3_bytes);
 36     dbms_output.put_line(' FS4 Blocks = '||l_fs4_blocks||' Bytes = '||l_fs4_bytes);
 37     dbms_output.put_line('Full Blocks = '||l_full_blocks||' Bytes = '||l_full_bytes);
 38  end;
 39  /
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 4 Bytes = 32768
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 39 Bytes = 319488

PL/SQL procedure successfully completed.

Full blocks number is 39 ; fs2 is 4

SQL&amp;gt; delete test where t1&amp;gt;10000 and (mod(t1,2)!=0);

5000 rows deleted.
Now :
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 4 Bytes = 32768
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 39 Bytes = 319488
nothing changed .

SQL&amp;gt; alter index ind_t1 coalesce;  

Index altered.
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 13 Bytes = 106496
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 30 Bytes = 245760

the free blocks increased

SQL&amp;gt; delete test where t1&amp;gt;10000;

5000 rows deleted.

SQL&amp;gt; commit;

Commit complete.

Now :
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 23 Bytes = 188416
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 20 Bytes = 163840
after full block delete ,the free blocks increased again.

SQL&amp;gt; alter index ind_t1 coalesce;

Index altered.

after coalesc , nothing changed:
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 23 Bytes = 188416
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 20 Bytes = 163840

but rebuild:
SQL&amp;gt; alter index ind_t1 rebuild;

Index altered.
FS1 Blocks = 0 Bytes = 0
FS2 Blocks = 1 Bytes = 8192
FS3 Blocks = 0 Bytes = 0
FS4 Blocks = 0 Bytes = 0
Full Blocks = 21 Bytes = 172032
</pre>
<p>what i want to ask, why the free blocks increased after coalesce? Can coalesce really resolve tx:index contention? If coalesce will lock table?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
