<?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</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 17:10:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Over-indexing &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-52692</link>
		<dc:creator><![CDATA[Over-indexing &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 10 Jan 2013 18:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-52692</guid>
		<description><![CDATA[[...] As we update data, we are going to delete entries from blocks in the left hand end of the index and insert them at the right hand end of the index. Depending on the rate and pattern of updates it is possible that a large number of blocks at the left hand end of the index will become close to empty –  this could have a significant impact on the effectiveness of the buffer cache and might encourage us to use the coalesce command on the index every few days. (If this sounds familiar, I have written about this particular index in the past.) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] As we update data, we are going to delete entries from blocks in the left hand end of the index and insert them at the right hand end of the index. Depending on the rate and pattern of updates it is possible that a large number of blocks at the left hand end of the index will become close to empty –  this could have a significant impact on the effectiveness of the buffer cache and might encourage us to use the coalesce command on the index every few days. (If this sounds familiar, I have written about this particular index in the past.) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jcon.no: Oracle Blog - When to rebuild an Oracle index?</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-44067</link>
		<dc:creator><![CDATA[jcon.no: Oracle Blog - When to rebuild an Oracle index?]]></dc:creator>
		<pubDate>Thu, 05 Jan 2012 10:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-44067</guid>
		<description><![CDATA[[...] a spesific schema. By the way &#8211; DO READ the notes in the script. There is also a link to a index analysis on FIFO columns. This article uses a LAST_UPDATE_DATE as an example. Such indexes might be candidates for [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a spesific schema. By the way &#8211; DO READ the notes in the script. There is also a link to a index analysis on FIFO columns. This article uses a LAST_UPDATE_DATE as an example. Such indexes might be candidates for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Index Efficiency 3 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-35675</link>
		<dc:creator><![CDATA[Index Efficiency 3 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 21:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-35675</guid>
		<description><![CDATA[[...] The last two cases, in particular, need a little more thought than just the simple &#8220;it&#8217;s two / four times the size&#8221;- and this is what the script index_efficiency_3.sql is about. Given the schema, table, and index name, it produces a report which tells you about the distribution of rows across index leaf blocks. The script is quite expensive to run &#8211; it reads every index leaf block calls an undocumented function, and then runs a large aggregation process. Make sure you read the notes before you use the script.  (For an example of use, showing some excel charts from the output, see the note at this URL.) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] The last two cases, in particular, need a little more thought than just the simple &#8220;it&#8217;s two / four times the size&#8221;- and this is what the script index_efficiency_3.sql is about. Given the schema, table, and index name, it produces a report which tells you about the distribution of rows across index leaf blocks. The script is quite expensive to run &#8211; it reads every index leaf block calls an undocumented function, and then runs a large aggregation process. Make sure you read the notes before you use the script.  (For an example of use, showing some excel charts from the output, see the note at this URL.) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-34826</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 22:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-34826</guid>
		<description><![CDATA[Henish,

Remember that the index is on trunc(last_update_date) - so the virtual column value is a constant for 24 hours. Since each index entry (non-unique index, remember) is then (column_value, rowid), the order in which we update the old value could affect the rows in an order that allowed earlier rowids to be updated after later rowids, filling in gaps in the index leaf blocks for the current date.]]></description>
		<content:encoded><![CDATA[<p>Henish,</p>
<p>Remember that the index is on trunc(last_update_date) &#8211; so the virtual column value is a constant for 24 hours. Since each index entry (non-unique index, remember) is then (column_value, rowid), the order in which we update the old value could affect the rows in an order that allowed earlier rowids to be updated after later rowids, filling in gaps in the index leaf blocks for the current date.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: henish</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-34825</link>
		<dc:creator><![CDATA[henish]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 22:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-34825</guid>
		<description><![CDATA[Respected Sir,

Nice presentation 



&quot;However, rather than take the worst case scenario, let’s take the best (and least likely) scenario – assume that by the end of the 
day there have been lots of 50/50 block splits, but a lot of back-fill has taken place (because of a random order of updates) and 
every block just happens to get very close to 100% full.&quot;



since the column last_update_date always reflect to the future date when the update happen,
how will it back-fill 

could you please explain?


Thanks]]></description>
		<content:encoded><![CDATA[<p>Respected Sir,</p>
<p>Nice presentation </p>
<p>&#8220;However, rather than take the worst case scenario, let’s take the best (and least likely) scenario – assume that by the end of the<br />
day there have been lots of 50/50 block splits, but a lot of back-fill has taken place (because of a random order of updates) and<br />
every block just happens to get very close to 100% full.&#8221;</p>
<p>since the column last_update_date always reflect to the future date when the update happen,<br />
how will it back-fill </p>
<p>could you please explain?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Index Explosion &#8211; 4 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-34455</link>
		<dc:creator><![CDATA[Index Explosion &#8211; 4 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Sat, 19 Sep 2009 15:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-34455</guid>
		<description><![CDATA[[...] two birds with one stone without realising it. If you want an example of this, take another look at this article on index analysis and ask yourself how much of the space wastage the article describes was due to deleting from the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] two birds with one stone without realising it. If you want an example of this, take another look at this article on index analysis and ask yourself how much of the space wastage the article describes was due to deleting from the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-32116</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 17:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-32116</guid>
		<description><![CDATA[Kumar,

It&#039;s always a good idea to consider reverse key indexes when you see an odd pattern of filling and emptying on an index - but I don&#039;t think it would really have much effect in this case.

Part of the problem with this index is that there are a lot of rows for each value - around 100 leaf blocks per value. If you reverse the key value, I think you might get some benefit at the high end block for a previously loaded date (in terms of re-filling the block &quot;earlier&quot;) but that wouldn&#039;t have impact overall.

If this were a really big table, though, it would be an idea that could be modelled fairly easily - maybe 3 or 4 hours of work - if you wanted to check the idea.]]></description>
		<content:encoded><![CDATA[<p>Kumar,</p>
<p>It&#8217;s always a good idea to consider reverse key indexes when you see an odd pattern of filling and emptying on an index &#8211; but I don&#8217;t think it would really have much effect in this case.</p>
<p>Part of the problem with this index is that there are a lot of rows for each value &#8211; around 100 leaf blocks per value. If you reverse the key value, I think you might get some benefit at the high end block for a previously loaded date (in terms of re-filling the block &#8220;earlier&#8221;) but that wouldn&#8217;t have impact overall.</p>
<p>If this were a really big table, though, it would be an idea that could be modelled fairly easily &#8211; maybe 3 or 4 hours of work &#8211; if you wanted to check the idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-32112</link>
		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 15:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-32112</guid>
		<description><![CDATA[Hi Jonathan:
Would a reverse key index help in this scenario?]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan:<br />
Would a reverse key index help in this scenario?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Klemme</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-32024</link>
		<dc:creator><![CDATA[Robert Klemme]]></dc:creator>
		<pubDate>Thu, 09 Oct 2008 11:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-32024</guid>
		<description><![CDATA[Jonathan,

thanks for the additional explanation!  I am afraid, I was not as clear as I would have liked to be.  First, I don&#039;t think I got an overdose from Richard - it&#039;s just a reinforcement of my natural scepticism. :-)

Then, about the size issue - my reasoning behind this was like this: the coalesce will reduce the wasted space of the index.  During the week a certain amount of wasted space is added in the way you described.  This volume of &quot;waste&quot; is roughly the same per week because you assumed a steady rate of inserts and updates.  The _percentage_ of waste thus decreases over time because the total space increases (deletion will only start in 2012).  The effect (i.e. achieving minimal wasted %) of a coalesce at the beginning will be reduced by insert / update activity much faster than after a year when the table and index have filled significantly.  This could be translated to : with increasing size of the index you can increase the interval of coalesce without wasting a too high _percentage_ of the space.

Few additional thoughts: if the table is expected to grow large maybe partitioning with local indexes can help limit the effort needed for coalesce because &quot;older&quot; partitions do not need to be coalesced any more.  Another idea I had was to use a FBI to reduce the number of indexed rows but unfortunately you can&#039;t use SYSDATE in there which you&#039;d have to to automatically &quot;expire&quot; entries.  After automatic partitioning in 11g maybe a rolling window for DATE and TIMESTAMP indexes would be a nice idea for Oracle 12. :-)

Cheers]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>thanks for the additional explanation!  I am afraid, I was not as clear as I would have liked to be.  First, I don&#8217;t think I got an overdose from Richard &#8211; it&#8217;s just a reinforcement of my natural scepticism. :-)</p>
<p>Then, about the size issue &#8211; my reasoning behind this was like this: the coalesce will reduce the wasted space of the index.  During the week a certain amount of wasted space is added in the way you described.  This volume of &#8220;waste&#8221; is roughly the same per week because you assumed a steady rate of inserts and updates.  The _percentage_ of waste thus decreases over time because the total space increases (deletion will only start in 2012).  The effect (i.e. achieving minimal wasted %) of a coalesce at the beginning will be reduced by insert / update activity much faster than after a year when the table and index have filled significantly.  This could be translated to : with increasing size of the index you can increase the interval of coalesce without wasting a too high _percentage_ of the space.</p>
<p>Few additional thoughts: if the table is expected to grow large maybe partitioning with local indexes can help limit the effort needed for coalesce because &#8220;older&#8221; partitions do not need to be coalesced any more.  Another idea I had was to use a FBI to reduce the number of indexed rows but unfortunately you can&#8217;t use SYSDATE in there which you&#8217;d have to to automatically &#8220;expire&#8221; entries.  After automatic partitioning in 11g maybe a rolling window for DATE and TIMESTAMP indexes would be a nice idea for Oracle 12. :-)</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/09/26/index-analysis/#comment-32023</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 09 Oct 2008 09:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=500#comment-32023</guid>
		<description><![CDATA[Robert,

Inoculation is good - an overdose isn&#039;t. My example suggests coalescing, but there are still cases (as Richard points out) where rebuilding can be a good idea.

Your comment about the size of the index is important.  In this (very specific) case, there is a rolling wedge of the index covering four to six week period that is constantly getting deletes at one end and inserts at the other - the total size of the index is irrelevant to the process of deleting from the earlier weeks and inserting into &quot;today&quot; - after seven years, we will still be looking at just the wedge for the most recent six weeks. Any resource wastage in this process will be due to the emptiness of the &quot;older&quot; leaf blocks in that wedge.

I think the image you have in mind is the index rebuild that has a packing effect on the entire index - bringing it back to its original pctfree - followed by random inserts all over the place that end up seeing an increased rate of block splits because the blocks are (temporarily) well packed. There&#039;s a demonstration of this in an article I wrote a few years ago: http://www.jlcomp.demon.co.uk/14_index_rebuild_i.html

In the example we don&#039;t have to worry about that phenomenon. At the start of each new day, our inserts go past the high end of the index and (apart from the current high-value block in the index) the timing of block splits will have nothing to do with the state of the rest of the index.]]></description>
		<content:encoded><![CDATA[<p>Robert,</p>
<p>Inoculation is good &#8211; an overdose isn&#8217;t. My example suggests coalescing, but there are still cases (as Richard points out) where rebuilding can be a good idea.</p>
<p>Your comment about the size of the index is important.  In this (very specific) case, there is a rolling wedge of the index covering four to six week period that is constantly getting deletes at one end and inserts at the other &#8211; the total size of the index is irrelevant to the process of deleting from the earlier weeks and inserting into &#8220;today&#8221; &#8211; after seven years, we will still be looking at just the wedge for the most recent six weeks. Any resource wastage in this process will be due to the emptiness of the &#8220;older&#8221; leaf blocks in that wedge.</p>
<p>I think the image you have in mind is the index rebuild that has a packing effect on the entire index &#8211; bringing it back to its original pctfree &#8211; followed by random inserts all over the place that end up seeing an increased rate of block splits because the blocks are (temporarily) well packed. There&#8217;s a demonstration of this in an article I wrote a few years ago: <a href="http://www.jlcomp.demon.co.uk/14_index_rebuild_i.html" rel="nofollow">http://www.jlcomp.demon.co.uk/14_index_rebuild_i.html</a></p>
<p>In the example we don&#8217;t have to worry about that phenomenon. At the start of each new day, our inserts go past the high end of the index and (apart from the current high-value block in the index) the timing of block splits will have nothing to do with the state of the rest of the index.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
