<?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: Bitmap Indexes</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/</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: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34895</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 25 Nov 2009 13:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34895</guid>
		<description><![CDATA[1) I think your guess is correct - a single key value can cover so many rows that the index has to hold several entries for it; so you have to have the hash unique step to eliminate duplicates.

2) The two plans are different - one of them counts key values, the other counts bits in the index entries (probably not really doing the conversion to rowids, but may it does). How different do you expect the plans to be ?]]></description>
		<content:encoded><![CDATA[<p>1) I think your guess is correct &#8211; a single key value can cover so many rows that the index has to hold several entries for it; so you have to have the hash unique step to eliminate duplicates.</p>
<p>2) The two plans are different &#8211; one of them counts key values, the other counts bits in the index entries (probably not really doing the conversion to rowids, but may it does). How different do you expect the plans to be ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svdixit</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34869</link>
		<dc:creator><![CDATA[svdixit]]></dc:creator>
		<pubDate>Fri, 20 Nov 2009 12:36:31 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34869</guid>
		<description><![CDATA[Hi Jonathan,

Thanks for your articles on BITMAP Indexes, they are very informational.

I have a question though, 

example 1:
I am running simple distinct query on column which has bitmap index. table is non-partitioned. Theoretically, all distinct extries have an associated BITMAP so oracle has to just emit BITMAP headers. Then why is there a &quot;HASH UNIQUE&quot; step? Does this have anything to do with the fact that a BITMAP for a value is broken into multiple chunks. 


example 2:
On same table, now I want to do &quot;count(*)&quot;. In this case also execution plan show same step &quot;BITMAP INDEX FAST FULL SCAN&quot;; I thought the operation is different in nature compared to previous distinct query. Earlier we were counting headers(example 1) so I was expecting to see some differentiation.

regards,

db version : DB 11Gr1, FX has ~4M rows; column c_id has 100 distinct values

select /*+ gather_plan_statistics */ distinct c_id from fx
Plan hash value: 693526871
-----------------------------------------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation		     &#124; Name    &#124; Starts &#124; E-Rows &#124; A-Rows &#124;   A-Time   &#124; Buffers &#124;  OMem &#124;  1Mem &#124; Used-Mem &#124;
-----------------------------------------------------------------------------------------------------------------------------
&#124;   1 &#124;  HASH UNIQUE		     &#124;	       &#124;      1 &#124;    100 &#124;    100 &#124;00:00:00.01 &#124;     731 &#124;  1067K&#124;  1067K&#124; 1217K (0)&#124;
&#124;   2 &#124;   BITMAP INDEX FAST FULL SCAN&#124; FX_BMP2 &#124;      1 &#124;   4163K&#124;   1300 &#124;00:00:00.01 &#124;     731 &#124;	 &#124;	 &#124;	    &#124;
-----------------------------------------------------------------------------------------------------------------------------

example 2:
select /*+ gather_plan_statistics */ count(*) from fx
Plan hash value: 106145427
---------------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation		      &#124; Name	&#124; Starts &#124; E-Rows &#124; A-Rows &#124;   A-Time	&#124; Buffers &#124;
---------------------------------------------------------------------------------------------------
&#124;   1 &#124;  SORT AGGREGATE 	      &#124; 	&#124;      1 &#124;	1 &#124;	 1 &#124;00:00:00.03 &#124;     731 &#124;
&#124;   2 &#124;   BITMAP CONVERSION COUNT     &#124; 	&#124;      1 &#124;   4163K&#124;   1300 &#124;00:00:00.03 &#124;     731 &#124;
&#124;   3 &#124;    BITMAP INDEX FAST FULL SCAN&#124; FX_BMP2 &#124;      1 &#124;	  &#124;   1300 &#124;00:00:00.01 &#124;     731 &#124;
---------------------------------------------------------------------------------------------------]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>Thanks for your articles on BITMAP Indexes, they are very informational.</p>
<p>I have a question though, </p>
<p>example 1:<br />
I am running simple distinct query on column which has bitmap index. table is non-partitioned. Theoretically, all distinct extries have an associated BITMAP so oracle has to just emit BITMAP headers. Then why is there a &#8220;HASH UNIQUE&#8221; step? Does this have anything to do with the fact that a BITMAP for a value is broken into multiple chunks. </p>
<p>example 2:<br />
On same table, now I want to do &#8220;count(*)&#8221;. In this case also execution plan show same step &#8220;BITMAP INDEX FAST FULL SCAN&#8221;; I thought the operation is different in nature compared to previous distinct query. Earlier we were counting headers(example 1) so I was expecting to see some differentiation.</p>
<p>regards,</p>
<p>db version : DB 11Gr1, FX has ~4M rows; column c_id has 100 distinct values</p>
<p>select /*+ gather_plan_statistics */ distinct c_id from fx<br />
Plan hash value: 693526871<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| Id  | Operation		     | Name    | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
|   1 |  HASH UNIQUE		     |	       |      1 |    100 |    100 |00:00:00.01 |     731 |  1067K|  1067K| 1217K (0)|<br />
|   2 |   BITMAP INDEX FAST FULL SCAN| FX_BMP2 |      1 |   4163K|   1300 |00:00:00.01 |     731 |	 |	 |	    |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>example 2:<br />
select /*+ gather_plan_statistics */ count(*) from fx<br />
Plan hash value: 106145427<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| Id  | Operation		      | Name	| Starts | E-Rows | A-Rows |   A-Time	| Buffers |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|   1 |  SORT AGGREGATE 	      | 	|      1 |	1 |	 1 |00:00:00.03 |     731 |<br />
|   2 |   BITMAP CONVERSION COUNT     | 	|      1 |   4163K|   1300 |00:00:00.03 |     731 |<br />
|   3 |    BITMAP INDEX FAST FULL SCAN| FX_BMP2 |      1 |	  |   1300 |00:00:00.01 |     731 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bitmap Updates &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34690</link>
		<dc:creator><![CDATA[Bitmap Updates &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 21 Oct 2009 17:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-34690</guid>
		<description><![CDATA[[...] Performance &#8212; Jonathan Lewis @ 5:33 pm UTC Oct 21,2009   It is fairly well-known that bitmap indexes are very dense structures that can behave badly if their underlying tables are subject to even [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Performance &#8212; Jonathan Lewis @ 5:33 pm UTC Oct 21,2009   It is fairly well-known that bitmap indexes are very dense structures that can behave badly if their underlying tables are subject to even [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-32796</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 15 Apr 2009 10:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-32796</guid>
		<description><![CDATA[Margaret,

I believe the option for &quot;temp_disabled&quot; has nothing to do &lt;em&gt;directly&lt;/em&gt; with memory usage; instead it changes the strategy used in the join back to the dimensions.  

If the dimension tables are large and your query is known to identify a relatively small fraction of the rows from a dimension then Oracle has the option of extracting those rows from the dimension and copying them into a global temporary table (which is specially defined by in-memory metadata). This means that the join back will probably do a hash join with a small GTT, rather than joining back to a large dimension.

If you allow Oracle to use a GTT, then the memory usage ought to be blocks in the buffer cache, plus a PGA cost for buildling a hash table from the GTT.

If you opt for temp_disable, the join back could be a nested loop (on primary key), a merge join (which could result in two sorts, one large fact sort and a smaller dimension sort), or a hash join (which would probably build a hash table from the dimension table).  Every query could be difference, and it could even be that the data set from the fact table is much smaller than the dimension anyway - which means the extracted fact data might be the thing that Oracle uses to build the hash table.

This doesn&#039;t answer your question, but I hope it fills in some of the information around the edges.]]></description>
		<content:encoded><![CDATA[<p>Margaret,</p>
<p>I believe the option for &#8220;temp_disabled&#8221; has nothing to do <em>directly</em> with memory usage; instead it changes the strategy used in the join back to the dimensions.  </p>
<p>If the dimension tables are large and your query is known to identify a relatively small fraction of the rows from a dimension then Oracle has the option of extracting those rows from the dimension and copying them into a global temporary table (which is specially defined by in-memory metadata). This means that the join back will probably do a hash join with a small GTT, rather than joining back to a large dimension.</p>
<p>If you allow Oracle to use a GTT, then the memory usage ought to be blocks in the buffer cache, plus a PGA cost for buildling a hash table from the GTT.</p>
<p>If you opt for temp_disable, the join back could be a nested loop (on primary key), a merge join (which could result in two sorts, one large fact sort and a smaller dimension sort), or a hash join (which would probably build a hash table from the dimension table).  Every query could be difference, and it could even be that the data set from the fact table is much smaller than the dimension anyway &#8211; which means the extracted fact data might be the thing that Oracle uses to build the hash table.</p>
<p>This doesn&#8217;t answer your question, but I hope it fills in some of the information around the edges.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Margaret Norman</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-32786</link>
		<dc:creator><![CDATA[Margaret Norman]]></dc:creator>
		<pubDate>Thu, 09 Apr 2009 20:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-32786</guid>
		<description><![CDATA[Jonathan,

We would like to use &quot;star_transformation_enabled = temp_disabled&quot; for our data warehouse implementation but are concerned about the amount of memory that could be used during the star transformation. We would like to measure the amount of memory used during our pre-production performance testing and  
estimate the memory that could be used for our production user volume.  Is the memory used when temp tables are disabled included in the session&#039;s PGA usage?

Thanks,
Margaret]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>We would like to use &#8220;star_transformation_enabled = temp_disabled&#8221; for our data warehouse implementation but are concerned about the amount of memory that could be used during the star transformation. We would like to measure the amount of memory used during our pre-production performance testing and<br />
estimate the memory that could be used for our production user volume.  Is the memory used when temp tables are disabled included in the session&#8217;s PGA usage?</p>
<p>Thanks,<br />
Margaret</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Wu</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-25159</link>
		<dc:creator><![CDATA[John Wu]]></dc:creator>
		<pubDate>Thu, 22 Nov 2007 23:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-25159</guid>
		<description><![CDATA[For those who are interested in what is behind the various implementations, &lt;a HREF=&quot;http://en.wikipedia.org/wiki/Bitmap_index&quot; rel=&quot;nofollow&quot;&gt;wikipedia has a pretty good entry about the underlying bitmap indexing technologies&lt;/A&gt;.  &lt;a HREF=&quot;http://lbl.gov/%7Ekwu/ps/LBNL-59952.html&quot; rel=&quot;nofollow&quot;&gt;This article has more in-depth desciption of the current development in bitmap index research&lt;/A&gt;.  It  appeared in a &lt;a HREF=&quot;http://www.cs.put.poznan.pl/rwrembel/dwolap_book.htm&quot; rel=&quot;nofollow&quot;&gt;book on data warehousing&lt;/A&gt;.]]></description>
		<content:encoded><![CDATA[<p>For those who are interested in what is behind the various implementations, <a HREF="http://en.wikipedia.org/wiki/Bitmap_index" rel="nofollow">wikipedia has a pretty good entry about the underlying bitmap indexing technologies</a>.  <a HREF="http://lbl.gov/%7Ekwu/ps/LBNL-59952.html" rel="nofollow">This article has more in-depth desciption of the current development in bitmap index research</a>.  It  appeared in a <a HREF="http://www.cs.put.poznan.pl/rwrembel/dwolap_book.htm" rel="nofollow">book on data warehousing</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-3033</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 01 Feb 2007 07:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-3033</guid>
		<description><![CDATA[Mark, to jog your memory: http://jonathanlewis.wordpress.com/2006/11/13/trust/ 

At least, in this case, the article mentions a version a couple of times, supplies the script for a test table, shows how to do block dumps, and reproduces a couple of extracts from a block dump to support the comments.  Thus allowing people to discover, and demonstrate conclusively, that in 10g the indexes behave differently when faced with a string of single-row updates - although the same cannot be said about the undo and redo costs.]]></description>
		<content:encoded><![CDATA[<p>Mark, to jog your memory: <a href="http://jonathanlewis.wordpress.com/2006/11/13/trust/" rel="nofollow">http://jonathanlewis.wordpress.com/2006/11/13/trust/</a> </p>
<p>At least, in this case, the article mentions a version a couple of times, supplies the script for a test table, shows how to do block dumps, and reproduces a couple of extracts from a block dump to support the comments.  Thus allowing people to discover, and demonstrate conclusively, that in 10g the indexes behave differently when faced with a string of single-row updates &#8211; although the same cannot be said about the undo and redo costs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Brady</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-3021</link>
		<dc:creator><![CDATA[Mark Brady]]></dc:creator>
		<pubDate>Wed, 31 Jan 2007 18:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-3021</guid>
		<description><![CDATA[@Doug,

&quot;regardless of it’s age&quot;

Remember JL&#039;s other rules including, &quot;If it&#039;s more than 6 weeks old it is rubbish and complete and utterly wrong.&quot; Or something like that, can&#039;t remember precisely.


@Ct

&quot;I do point out them to my friends&quot;

Not sure whether to feel pity or jealousy.]]></description>
		<content:encoded><![CDATA[<p>@Doug,</p>
<p>&#8220;regardless of it’s age&#8221;</p>
<p>Remember JL&#8217;s other rules including, &#8220;If it&#8217;s more than 6 weeks old it is rubbish and complete and utterly wrong.&#8221; Or something like that, can&#8217;t remember precisely.</p>
<p>@Ct</p>
<p>&#8220;I do point out them to my friends&#8221;</p>
<p>Not sure whether to feel pity or jealousy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: H.Tonguç YILMAZ Blog &#187; Understanding Bitmap Indexes with Examples</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-349</link>
		<dc:creator><![CDATA[H.Tonguç YILMAZ Blog &#187; Understanding Bitmap Indexes with Examples]]></dc:creator>
		<pubDate>Mon, 04 Dec 2006 11:44:37 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-349</guid>
		<description><![CDATA[[...] Understanding Bitmap indexes http://www.jlcomp.demon.co.uk/03_bitmap_1i.html http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/ [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Understanding Bitmap indexes <a href="http://www.jlcomp.demon.co.uk/03_bitmap_1i.html" rel="nofollow">http://www.jlcomp.demon.co.uk/03_bitmap_1i.html</a> <a href="http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/" rel="nofollow">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-346</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 03 Dec 2006 21:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/11/29/bitmap-indexes/#comment-346</guid>
		<description><![CDATA[Jonas, you didn&#039;t say whether these were local or global indexes, bitmap or b-tree, or whether you were exchanging new (hence empty) partitions with freshly load tables, or using the exchange as a way of adding data to existing partitions (copy old partition, append data, exchange...).

My best guess is that this refers to global indexes where there was pre-existing data in the partitions, and you were using the &#039;maintain (global) indexes&#039; option, with the result that Oracle does a massive &#039;direct path&#039; delete then insert on the indexes - which is exactly the type of operation where you are most likely to see waste space accumulating in the indexes.]]></description>
		<content:encoded><![CDATA[<p>Jonas, you didn&#8217;t say whether these were local or global indexes, bitmap or b-tree, or whether you were exchanging new (hence empty) partitions with freshly load tables, or using the exchange as a way of adding data to existing partitions (copy old partition, append data, exchange&#8230;).</p>
<p>My best guess is that this refers to global indexes where there was pre-existing data in the partitions, and you were using the &#8216;maintain (global) indexes&#8217; option, with the result that Oracle does a massive &#8216;direct path&#8217; delete then insert on the indexes &#8211; which is exactly the type of operation where you are most likely to see waste space accumulating in the indexes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
