From: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
---|---|
To: | mark(at)mark(dot)mielke(dot)cc |
Cc: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Jie Zhang <jzhang(at)greenplum(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bitmap index thoughts |
Date: | 2006-12-27 15:42:36 |
Message-ID: | 4592946C.4060206@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
mark(at)mark(dot)mielke(dot)cc wrote:
> On Wed, Dec 27, 2006 at 10:16:54PM +1100, Gavin Sherry wrote:
>> On Wed, 27 Dec 2006, Heikki Linnakangas wrote:
>>> But actually I'm not convinced we need to worry about efficient storage
>>> of small bitmaps at all. The typical use case for bitmap indexes is
>>> large tables with small number of distinct values, and the problem
>>> doesn't really arise in that scenario. Let's keep it simple for now, we
>>> can enhance it in later releases.
>> The scenario I'm concerned about is where a sales data base, say, has
>> 100,000 products. However, only 500 or 1000 products are popular. They
>> dominate, say >99% of the sales. The other 99,900 products consume a
>> little bit over 8K each for very little benefit :-(.
>> This is pretty contrived but it seem real world enough...
>
> Seems like a good candidate for CREATE INDEX WHERE :-)
Yeah, that was my first thought as well. However, in Gavin's example it
would be a nightmare to manually update the list popular products, and
recreate the index when it changes.
Something clever inside bitmap indexam would clearly be better.
But even in that scenario, 99000*8k pages ~= 750 megabytes of wasted
space might still be acceptable. Or not.
> I wonder what would happen if somebody implemented automatic index
> exclusion conditions after use of an INDEX proved to be in the realm
> of the worst case scenario? :-)
I'm sorry, I don't understand that sentence...
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | dakotali kasap | 2006-12-27 16:33:02 | how to add my source file? |
Previous Message | Bruce Momjian | 2006-12-27 15:10:47 | Re: Patch(es) to expose n_live_tuples and |