<?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: Btree / Bitmap</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Fri, 17 May 2013 13:58:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Philosophy – 8 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/#comment-37878</link>
		<dc:creator><![CDATA[Philosophy – 8 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 24 Nov 2010 18:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2480#comment-37878</guid>
		<description><![CDATA[[...] 23rd Dec 2009: I&#8217;ve written a follow-up article to this note since the point I was trying to make seemed to cause some [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 23rd Dec 2009: I&#8217;ve written a follow-up article to this note since the point I was trying to make seemed to cause some [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todor Botev</title>
		<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/#comment-35352</link>
		<dc:creator><![CDATA[Todor Botev]]></dc:creator>
		<pubDate>Fri, 29 Jan 2010 08:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2480#comment-35352</guid>
		<description><![CDATA[&quot;Secondly, you would probably have a foreign key constraint relating the order_lines table to the orders table, and you might decide that you needed a supporting index on the order_lines table to avoid  locking issues.&quot;

Of course this is generally quite reasonable. But in the given case - no deletes on the parent table, no updates of order_number - I think you shouldn&#039;t be that much afraid of locking issues due to FK on order_number.]]></description>
		<content:encoded><![CDATA[<p>&#8220;Secondly, you would probably have a foreign key constraint relating the order_lines table to the orders table, and you might decide that you needed a supporting index on the order_lines table to avoid  locking issues.&#8221;</p>
<p>Of course this is generally quite reasonable. But in the given case &#8211; no deletes on the parent table, no updates of order_number &#8211; I think you shouldn&#8217;t be that much afraid of locking issues due to FK on order_number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/#comment-35169</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 08:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2480#comment-35169</guid>
		<description><![CDATA[Gary,

There are various ways you might have &quot;only 2 distinct values&quot; - so the question comes back to the basic one of indexing: &lt;em&gt;&quot;will the index eliminate more work than it introduces (at the point in time when it really matters) ?&quot;&lt;/em&gt;

There&#039;s also the question of whether you have to stick with the current SQL, or whether you can enigineer the code and the indexes at the same time.

For example:  
&lt;ul&gt;
If your two values are &#039;N&#039; and &#039;Y&#039;, and nearly all the data has value &#039;Y&#039;, then an index on that column could be very helpful for the query &lt;em&gt;&quot;select where col = &#039;N&#039;&quot;&lt;/em&gt; - but only if you have a histogram on that column.  

On the other hand, if you can change the code and data so that it holds &#039;N&#039; or null then you get a tiny index and don&#039;t need the histogram. 

On the third hand - if you create the index as (decode(col,&#039;N&#039;.N&#039;,null)) you don&#039;t have to change the code that maintains the data, you get a tiny index, you don&#039;t need the histogram, but you have to modify the code that queries the data so that the queries match the index definition.&lt;/ul&gt;]]></description>
		<content:encoded><![CDATA[<p>Gary,</p>
<p>There are various ways you might have &#8220;only 2 distinct values&#8221; &#8211; so the question comes back to the basic one of indexing: <em>&#8220;will the index eliminate more work than it introduces (at the point in time when it really matters) ?&#8221;</em></p>
<p>There&#8217;s also the question of whether you have to stick with the current SQL, or whether you can enigineer the code and the indexes at the same time.</p>
<p>For example:  </p>
<ul>
If your two values are &#8216;N&#8217; and &#8216;Y&#8217;, and nearly all the data has value &#8216;Y&#8217;, then an index on that column could be very helpful for the query <em>&#8220;select where col = &#8216;N&#8217;&#8221;</em> &#8211; but only if you have a histogram on that column.  </p>
<p>On the other hand, if you can change the code and data so that it holds &#8216;N&#8217; or null then you get a tiny index and don&#8217;t need the histogram. </p>
<p>On the third hand &#8211; if you create the index as (decode(col,&#8217;N&#8217;.N&#8217;,null)) you don&#8217;t have to change the code that maintains the data, you get a tiny index, you don&#8217;t need the histogram, but you have to modify the code that queries the data so that the queries match the index definition.</ul>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/#comment-35165</link>
		<dc:creator><![CDATA[Gary]]></dc:creator>
		<pubDate>Wed, 06 Jan 2010 22:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2480#comment-35165</guid>
		<description><![CDATA[I&#039;m trying to understand if the btree index will help in the case of column with only 2 distinct values in oltp database with lots of updates happening on the table.
Also, how does btree index works on the columns with low number of distinct values.

Thanks,
Gary]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to understand if the btree index will help in the case of column with only 2 distinct values in oltp database with lots of updates happening on the table.<br />
Also, how does btree index works on the columns with low number of distinct values.</p>
<p>Thanks,<br />
Gary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report &#8211; 18/12/2009-25/12/2009 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2009/12/23/btree-bitmap/#comment-35164</link>
		<dc:creator><![CDATA[Blogroll Report &#8211; 18/12/2009-25/12/2009 &#171; Coskan&#8217;s Approach to Oracle]]></dc:creator>
		<pubDate>Wed, 06 Jan 2010 19:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2480#comment-35164</guid>
		<description><![CDATA[[...] 15-Compressed Btree indexes vs Bitmap indexes Jonathan Lewis-Btree/Bitmap [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 15-Compressed Btree indexes vs Bitmap indexes Jonathan Lewis-Btree/Bitmap [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
