Re: Is there going to be a port to Solaris 9 x86 in the

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there going to be a port to Solaris 9 x86 in the
Date: 2003-11-19 06:22:59
Message-ID: 87d6bo6fng.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:

> On Tue, Nov 18, 2003 at 02:31:03PM -0800, Sailesh Krishnamurthy wrote:
>
> > Another thing I toyed with was having an implementation of a
> > Tid-List-Fetch .. sorting a TID-list from an index and fetching the
> > records of the relation off the sorted list for better IO
> > performance. AFAICT something like this isn't present yet .. can pgsql
> > do this already ?

I think you're talking about situations like
"where x = ? or y = ?"
or
"where x = ? and y = ?"

When both `x' and `y' are indexed. It's possible to do the index lookup,
gather a list of tid pointers in some efficient format like a bit vector, and
apply the and/or and any other clauses.

Oracle can do this, and it's useful in some cases when you have DSS-style
where all the indexes have poor selectivity but using enough of them together
gets you a reasonable number of records.

In my experience it was never really very useful. I suspect there are specific
situations where it makes a big difference though.

> Nope. In fact it's on the TODO list. I think people call it "bitmap
> indexes", the idea being that the TID list is represented as a "sparse
> bitmap" (go ask some JPEG hacker what that means).
>
> Extra points if multiple bitmaps can be ANDed and ORed, to allow using
> multiple indexes simultaneously ...

I think this is different from what he meant, but yes, bitmap indexes might be
an interesting project. Like hash indexes they have limited uses, but when
they're useful they're VERY useful. In Oracle they're mainly useful for
low-cardinality attributes like flags on rarely-updated tables. (Actually I
wonder whether locking in postgres would be simpler than locking Oracle
because of the no-update style of MVCC, hmm.)

--
greg

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-19 06:37:54 Re: Slashdot
Previous Message Alvaro Herrera 2003-11-19 04:53:12 Re: Is there going to be a port to Solaris 9 x86 in the

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-19 06:32:23 Re: More detail on settings for pgavd?
Previous Message Greg Stark 2003-11-19 06:07:56 Re: [pgsql-advocacy] Not 7.5, but 8.0 ?