Re: Experiences of PostgreSQL on-disk bitmap index patch

Lists: pgsql-general
From: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 21:08:48
Message-ID: a4aab4dc0706201408w321da3ddm6bb8cb7fed1c8170@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi!

I'm working on building a PostgreSQL based data warehouse, and I'm thus very
interested in any experiences and usage of the PostgreSQL bitmap index
patches (which I've found on pgsql-patches).

Anyone using these patchese on production systems?
Anyone know if the patches run on latest stable 8.2?
Issues applying the patch to latest 8.2 source?
Other experiences of the patches?

If there's any PgSQL developer reading this - when can on-disk bitmap
indexes be expected to be included in stable PostgreSQL versions?

Thank you folks!

Best regards,
Christian


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Christan Josefsson <cjosefsson(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 21:23:41
Message-ID: 46799ADD.2050500@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Christan Josefsson wrote:
> Hi!
>
> I'm working on building a PostgreSQL based data warehouse, and I'm thus
> very interested in any experiences and usage of the PostgreSQL bitmap
> index patches (which I've found on pgsql-patches).
>
> Anyone using these patchese on production systems?
> Anyone know if the patches run on latest stable 8.2?
> Issues applying the patch to latest 8.2 source?
> Other experiences of the patches?

They work against -HEAD.
They are not finished.
They have not been tested.
They do not support Vacuum.

Joshua D. Drake

>
> If there's any PgSQL developer reading this - when can on-disk bitmap
> indexes be expected to be included in stable PostgreSQL versions?
>
> Thank you folks!
>
> Best regards,
> Christian

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


From: "Alexander Staubo" <alex(at)purefiction(dot)net>
To: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 21:25:33
Message-ID: 88daf38c0706201425o5fd5345bl8d545fd1f7fc5d79@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 6/20/07, Christan Josefsson <cjosefsson(at)gmail(dot)com> wrote:
> Anyone using these patchese on production systems?

If these are the same patches that were made for Bizgres, then they
are bound to be in use in some current production systems of that
version of PostgreSQL.

> If there's any PgSQL developer reading this - when can on-disk bitmap
> indexes be expected to be included in stable PostgreSQL versions?

It's scheduled for inclusion in 8.3, which is close to getting a beta release:

http://www.postgresql.org/developer/roadmap

Alexander.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alexander Staubo" <alex(at)purefiction(dot)net>
Cc: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 21:37:41
Message-ID: 2213.1182375461@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Alexander Staubo" <alex(at)purefiction(dot)net> writes:
> On 6/20/07, Christan Josefsson <cjosefsson(at)gmail(dot)com> wrote:
>> If there's any PgSQL developer reading this - when can on-disk bitmap
>> indexes be expected to be included in stable PostgreSQL versions?

> It's scheduled for inclusion in 8.3,

Not any more --- we gave up waiting for a finished patch to be
submitted.
http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php
http://archives.postgresql.org/pgsql-patches/2007-05/msg00299.php
http://developer.postgresql.org/index.php/Todo:PatchStatus

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Alexander Staubo <alex(at)purefiction(dot)net>
Cc: Christan Josefsson <cjosefsson(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 21:55:13
Message-ID: 4679A241.6060008@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Alexander Staubo wrote:
> On 6/20/07, Christan Josefsson <cjosefsson(at)gmail(dot)com> wrote:
>> Anyone using these patchese on production systems?
>
> If these are the same patches that were made for Bizgres, then they
> are bound to be in use in some current production systems of that
> version of PostgreSQL.
>
>> If there's any PgSQL developer reading this - when can on-disk bitmap
>> indexes be expected to be included in stable PostgreSQL versions?
>
> It's scheduled for inclusion in 8.3, which is close to getting a beta
> release:
>
> http://www.postgresql.org/developer/roadmap

Just so there is no confusion. These WILL NOT be in 8.3:

http://developer.postgresql.org/index.php/Todo:PatchStatus

Joshua D. Drake

>
> Alexander.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


From: "Alexander Staubo" <alex(at)purefiction(dot)net>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-20 22:15:00
Message-ID: 88daf38c0706201515y33201f9bwc031d2d4b669db8d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 6/20/07, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> Just so there is no confusion. These WILL NOT be in 8.3:
>
> http://developer.postgresql.org/index.php/Todo:PatchStatus

Apologies. I didn't know they had been put on hold.

Alexander.


From: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>
To: "Alexander Staubo" <alex(at)purefiction(dot)net>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-21 08:39:29
Message-ID: a4aab4dc0706210139m6284f5am7905f78fdf1a40ad@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Ok.

Big thanks for the information.

You mentioned Bizgres, do you have any more information in that direction,
or do you know who to contact regarding information on Bizgres bitmap
indexes. If there is a bitmap index patch in Bizgres which can be applied to
the latest stable source of PostgreSQL then I have a solution until 8.4 (which
I according to your answers is the assumed release for introducing on-disk
bitmap indexes).

Any guess when 8.4 could be production ready? A year or more?

Regards,
Christian

2007/6/21, Alexander Staubo <alex(at)purefiction(dot)net>:
>
> On 6/20/07, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> > Just so there is no confusion. These WILL NOT be in 8.3:
> >
> > http://developer.postgresql.org/index.php/Todo:PatchStatus
>
> Apologies. I didn't know they had been put on hold.
>
> Alexander.
>


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-21 15:39:16
Message-ID: 20070621153916.GV5500@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Thu, Jun 21, 2007 at 10:39:29AM +0200, Christan Josefsson wrote:
> Any guess when 8.4 could be production ready? A year or more?

"In the future" is what I'd be willing to state out loud ;-) 8.3
hasn't finished development yet. I wouldn't hold my breath.

You can find out more about bizgres at http://bizgres.org/home.php.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
The plural of anecdote is not data.
--Roger Brinner


From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: Christan Josefsson <cjosefsson(at)gmail(dot)com>
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-21 21:12:00
Message-ID: 467AE9A0.2010404@theendofthetunnel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Christan Josefsson wrote:
> Any guess when 8.4 could be production ready? A year or more?

Why don't you just use Bizgres?

Right, they don't release that often, and 0.9 misses various fixes that
went into PostgreSQL. But if it has what you are after and works for you..

--
Best regards,
Hannes Dorbath


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>, "Alexander Staubo" <alex(at)purefiction(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-25 12:30:29
Message-ID: 200706250830.30318.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Thursday 21 June 2007 04:39, Christan Josefsson wrote:
> Ok.
>
> Big thanks for the information.
>
> You mentioned Bizgres, do you have any more information in that direction,
> or do you know who to contact regarding information on Bizgres bitmap
> indexes. If there is a bitmap index patch in Bizgres which can be applied
> to the latest stable source of PostgreSQL then I have a solution until 8.4
> (which I according to your answers is the assumed release for introducing
> on-disk bitmap indexes).
>

If you really want to see on-disk bitmaps in, you might want to study the
patches and the missing vacuum related bits and then think about submitting
an updated version. My take on the future of that patch is the original
developers aren't terribly motivated to finish it, in much part because some
of the testing people have done vs. 8.3 shows it solves an even smaller
number of issues than originally hoped. my .02 anyway.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL


From: "Christan Josefsson" <cjosefsson(at)gmail(dot)com>
To: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, "Alexander Staubo" <alex(at)purefiction(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-25 13:01:31
Message-ID: a4aab4dc0706250601v2efcb024ob949f5b757207c5d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thanks Robert!

So you indicate that the so called bitmap index scan, a.k.a in-memory bitmap
indexes (right?), already adds such an improvement when it comes to
optimized response time on large query sets (having the characteristics as
normally used to identify cases where bitmap indexes improves performance
like: low cardinality keys, large data volumes etc), so that the on-disk
indexes are not really needed or atleast not worth wile implementing?

Regards,
Christian

2007/6/25, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>:
>
> On Thursday 21 June 2007 04:39, Christan Josefsson wrote:
> > Ok.
> >
> > Big thanks for the information.
> >
> > You mentioned Bizgres, do you have any more information in that
> direction,
> > or do you know who to contact regarding information on Bizgres bitmap
> > indexes. If there is a bitmap index patch in Bizgres which can be
> applied
> > to the latest stable source of PostgreSQL then I have a solution until
> 8.4
> > (which I according to your answers is the assumed release for
> introducing
> > on-disk bitmap indexes).
> >
>
> If you really want to see on-disk bitmaps in, you might want to study the
> patches and the missing vacuum related bits and then think about
> submitting
> an updated version. My take on the future of that patch is the original
> developers aren't terribly motivated to finish it, in much part because
> some
> of the testing people have done vs. 8.3 shows it solves an even smaller
> number of issues than originally hoped. my .02 anyway.
>
> --
> Robert Treat
> Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
>


From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-25 13:48:28
Message-ID: 60zm2o2lhv.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

cjosefsson(at)gmail(dot)com ("Christan Josefsson") writes:
> So you indicate that the so called bitmap index scan, a.k.a
> in-memory bitmap indexes (right?), already adds such an
> improvement when it comes to optimized response time on large
> query sets (having the characteristics as normally used to
> identify cases where bitmap indexes improves performance like:
> low cardinality keys, large data volumes etc), so that the
> on-disk indexes are not really needed or atleast not worth wile
> implementing?

It looks very much like that may be the case...

Bitmap index scans have a somewhat different set of functionality, but
there is enough overlap that the cases where on-disk bitmap indexes
are useful (and in-memory bitmap scans aren't) look like rare edge
cases.

There may be users that see those "rare edge cases" all the time;
they'll find on-disk bitmap indexes worth having, and, possibly, worth
implementing.

But to be sure, there used to be a lot of "burning interest" in
on-disk bitmap indexes, and in-memory bitmap index scans have quenched
many of the flames...
--
"cbbrowne","@","cbbrowne.com"
http://linuxfinances.info/info/advocacy.html
">WindowsNT will not accept fecal matter in its diet... it's that simple.

I suppose that is a good ward against cannibalism." -- Nick Manka


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-06-25 14:58:56
Message-ID: 28728.1182783536@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Chris Browne <cbbrowne(at)acm(dot)org> writes:
> But to be sure, there used to be a lot of "burning interest" in
> on-disk bitmap indexes, and in-memory bitmap index scans have quenched
> many of the flames...

Well, we had in-memory bitmaps already in 8.1, and the bitmap index work
happened since that.

I think the main argument for bitmap indexes is the potential to make
the index smaller. A btree index requires a minimum of 16 bytes per
entry (20 if MAXALIGN=8), whereas a bitmap index can in principle get
down to a few bits per entry for a high-cardinality column value.
So you could hope for a 10x smaller index and corresponding reduction in
index search time.

The fly in the ointment is that if the column value is so high
cardinality as all that, it's questionable whether you want an index
search at all rather than just seqscanning; and it's definite that
the index access cost will be only a fraction of the heap access cost.
So the prospects for actual net performance gain are a lot less than
the index-size argument makes them look.

There doubtless are gains on some workloads, but how much and on how
wide a range of workloads is still an open question.

regards, tom lane


From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Date: 2007-07-03 03:39:53
Message-ID: 4689C509.6040308@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 06/25/07 09:58, Tom Lane wrote:
[snip]
>
> The fly in the ointment is that if the column value is so high
> cardinality as all that, it's questionable whether you want an index
> search at all rather than just seqscanning; and it's definite that
> the index access cost will be only a fraction of the heap access cost.
> So the prospects for actual net performance gain are a lot less than
> the index-size argument makes them look.

Well they definitely are for data warehouses, in which many
high-cardinality columns each have an index.

Because of their small disk size, ANDing them is fast and winnows
down the result set. That's the theory, of course.

--
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!