<?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"
	>
<channel>
	<title>Comments on: why is bitmap index not designed for OLTP</title>
	<atom:link href="http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html</link>
	<description>Oracle Certified Master</description>
	<pubDate>Mon, 01 Dec 2008 19:59:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: John Wu</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-4986</link>
		<dc:creator>John Wu</dc:creator>
		<pubDate>Wed, 10 Oct 2007 01:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-4986</guid>
		<description>For those who are interested in getting their hand dirty, I have a free software package called FastBit that implements a set of very efficient compressed bitmap indexes.  The software is available for download at http://sdm.lbl.gov/fastbit/src/.  You can also find lots of information about the algorithms behind the software at http://sdm.lbl.gov/fastbit/.</description>
		<content:encoded><![CDATA[<p>For those who are interested in getting their hand dirty, I have a free software package called FastBit that implements a set of very efficient compressed bitmap indexes.  The software is available for download at <a href="http://sdm.lbl.gov/fastbit/src/" rel="nofollow">http://sdm.lbl.gov/fastbit/src/</a>.  You can also find lots of information about the algorithms behind the software at <a href="http://sdm.lbl.gov/fastbit/" rel="nofollow">http://sdm.lbl.gov/fastbit/</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Minde</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-4066</link>
		<dc:creator>Minde</dc:creator>
		<pubDate>Tue, 19 Jun 2007 17:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-4066</guid>
		<description>According to the Wikipedia entry, there appears to be a lot of new research work that ORACLE has not consider.  Does anyone have any interest in pushing ORACLE to do something in that front?</description>
		<content:encoded><![CDATA[<p>According to the Wikipedia entry, there appears to be a lot of new research work that ORACLE has not consider.  Does anyone have any interest in pushing ORACLE to do something in that front?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1512</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Sun, 25 Mar 2007 23:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1512</guid>
		<description>"then an 8K block can store a bitmap segment for males/females that covers about 30,000 rows in the table"
You've missed the concept of compression here. Broadly, oracle doesn't always store one bit per database row. It can store something reflecting "the 100,000 rows between rowids X and Y are all flagged zero" As such, a single bitmap segment can cover many more than 30,000 rows. It COULD cover an entire table.
Check page/slide 24 onwards in 
http://julian.dyke.users.btopenworld.com/com/Presentations/BitmapIndexInternals.ppt</description>
		<content:encoded><![CDATA[<p>&#8220;then an 8K block can store a bitmap segment for males/females that covers about 30,000 rows in the table&#8221;<br />
You&#8217;ve missed the concept of compression here. Broadly, oracle doesn&#8217;t always store one bit per database row. It can store something reflecting &#8220;the 100,000 rows between rowids X and Y are all flagged zero&#8221; As such, a single bitmap segment can cover many more than 30,000 rows. It COULD cover an entire table.<br />
Check page/slide 24 onwards in<br />
<a href="http://julian.dyke.users.btopenworld.com/com/Presentations/BitmapIndexInternals.ppt" rel="nofollow">http://julian.dyke.users.btopenworld.com/com/Presentations/BitmapIndexInternals.ppt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: laurentschneider</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1463</link>
		<dc:creator>laurentschneider</dc:creator>
		<pubDate>Sat, 24 Mar 2007 05:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1463</guid>
		<description>thanks Peter and Howard for making this point clear, I really appreciate</description>
		<content:encoded><![CDATA[<p>thanks Peter and Howard for making this point clear, I really appreciate</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard Rogers</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1457</link>
		<dc:creator>Howard Rogers</dc:creator>
		<pubDate>Fri, 23 Mar 2007 21:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1457</guid>
		<description>Please don't propagate hoary old myths! A bitmap index does NOT cause "the whole table to be locked" when being updated. 

Whereas a B*Tree index has individual entries for each row in a table so that updating a table row only causes us to lock one index entry, a bitmap index has a string of bits describing (in your example) the 'maleness' of all rows in the table and a different string of bits describing the 'femaleness' of all rows. When you update the index (because you've updated the table) you take a lock on the string of bits -technically known as the bitmap segment. Importantly, however, the string of bits has to be broken up so that it fits into different Oracle blocks... and an update to one block's-worth of the string of bits doesn't cause the other blocks' contents to be locked.

If you consider that an 8K block can store about 65,000 bits; and if you work with the rough assumption that one bit describes the maleness of rows and one bit describes femaleness, then an 8K block can store a bitmap segment for males/females that covers about 30,000 rows in the table. When you update one row in the table, you find the bit in a bitmap segment that references that row, and you lock that entire bitmap segment in order to update that one bit. That has the effect of locking the approximately 30,000 rows in the table also covered by that bitmap segment. But it doesn't lock the Lord knows how many other rows that are not covered by that bitmap segment.

Now, that's extremely bad news if you are an OLTP environment and need highly concurrent DML taking place on that table, but it's definitely not the entire table being locked, and if your table had 50 billion rows in it, you might well not notice 30,000 of them being locked for one update!</description>
		<content:encoded><![CDATA[<p>Please don&#8217;t propagate hoary old myths! A bitmap index does NOT cause &#8220;the whole table to be locked&#8221; when being updated. </p>
<p>Whereas a B*Tree index has individual entries for each row in a table so that updating a table row only causes us to lock one index entry, a bitmap index has a string of bits describing (in your example) the &#8216;maleness&#8217; of all rows in the table and a different string of bits describing the &#8216;femaleness&#8217; of all rows. When you update the index (because you&#8217;ve updated the table) you take a lock on the string of bits -technically known as the bitmap segment. Importantly, however, the string of bits has to be broken up so that it fits into different Oracle blocks&#8230; and an update to one block&#8217;s-worth of the string of bits doesn&#8217;t cause the other blocks&#8217; contents to be locked.</p>
<p>If you consider that an 8K block can store about 65,000 bits; and if you work with the rough assumption that one bit describes the maleness of rows and one bit describes femaleness, then an 8K block can store a bitmap segment for males/females that covers about 30,000 rows in the table. When you update one row in the table, you find the bit in a bitmap segment that references that row, and you lock that entire bitmap segment in order to update that one bit. That has the effect of locking the approximately 30,000 rows in the table also covered by that bitmap segment. But it doesn&#8217;t lock the Lord knows how many other rows that are not covered by that bitmap segment.</p>
<p>Now, that&#8217;s extremely bad news if you are an OLTP environment and need highly concurrent DML taking place on that table, but it&#8217;s definitely not the entire table being locked, and if your table had 50 billion rows in it, you might well not notice 30,000 of them being locked for one update!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Robertson</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1455</link>
		<dc:creator>William Robertson</dc:creator>
		<pubDate>Fri, 23 Mar 2007 13:46:01 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1455</guid>
		<description>Yes, that's what I meant. The example didn't mention any other bitmap indexes that could be used in combination, so I couldn't see much use for that particular index. I appreciate that was just a contrived example and Laurent was making a point about locking though.</description>
		<content:encoded><![CDATA[<p>Yes, that&#8217;s what I meant. The example didn&#8217;t mention any other bitmap indexes that could be used in combination, so I couldn&#8217;t see much use for that particular index. I appreciate that was just a contrived example and Laurent was making a point about locking though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Scott</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1454</link>
		<dc:creator>Peter Scott</dc:creator>
		<pubDate>Fri, 23 Mar 2007 11:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1454</guid>
		<description>William - what is "in general" ;-)

Yes, bad if it is the only bitmap index on a table, but possibly good if there are others that can be 'ANDed' away with the gender bitmap to give a very small set of rows. That said though I have never bitmap indexed gender</description>
		<content:encoded><![CDATA[<p>William - what is &#8220;in general&#8221; <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Yes, bad if it is the only bitmap index on a table, but possibly good if there are others that can be &#8216;ANDed&#8217; away with the gender bitmap to give a very small set of rows. That said though I have never bitmap indexed gender</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Robertson</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1453</link>
		<dc:creator>William Robertson</dc:creator>
		<pubDate>Fri, 23 Mar 2007 10:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1453</guid>
		<description>I thought having a bitmap on columns like GENDER(male/female) is a very bad practice in general, regardless of locking issues.</description>
		<content:encoded><![CDATA[<p>I thought having a bitmap on columns like GENDER(male/female) is a very bad practice in general, regardless of locking issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Scott</title>
		<link>http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1452</link>
		<dc:creator>Peter Scott</dc:creator>
		<pubDate>Fri, 23 Mar 2007 10:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://laurentschneider.com/wordpress/2007/03/why-is-bitmap-index-not-designed-for-oltp.html#comment-1452</guid>
		<description>If not the whole table then a large numbers of rows!
There is a limit to the number of rows referred to in each bitmap. multiple bitmaps for a key value do happen</description>
		<content:encoded><![CDATA[<p>If not the whole table then a large numbers of rows!<br />
There is a limit to the number of rows referred to in each bitmap. multiple bitmaps for a key value do happen</p>
]]></content:encoded>
	</item>
</channel>
</rss>
