Bitmap Index sizes
<p>I am currently learning about bitmap indexes and I am wondering if anyone could shed some light on a question I have come across.</p>

<p><strong>Suppose you have a million record and a field "weekday" that can take only 7 values. how big will the bitmap index be?</strong></p>

<p>My understanding of BitMaps would lead me to believe that you would take the unique fields (7) and multiply them by the number of records (1,000,000).</p>

<p>therefore you would have 7,000,000 bits as the size of the bitmap index.</p>

<p>is this correct?</p>

<p>Or what was pointed out to me by a friend was that each day would be stored as binary (001 Monday, 010 Tuesday, 011 Wednesday etc..) leaving us with 111 as the 7th day, and only taking up 3 bits as the size.</p>

<p>Any help on this would be greatly appreciated.</p>