Re: plans for bitmap indexes?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plans for bitmap indexes?
Date: 2004-10-12 22:28:06
Message-ID: ckhlpk$geq$1@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus wrote:
> Chris,
>
>
>>The most nearly comparable thing is be the notion of "partial
>>indexes," where, supposing you had 60 region codes (e.g. - 50 US
>>states, 10 Canadian provinces), you might set up indices thus:
>
>
> I'm afraid that you're mistaken about the functionality of bitmap indexes.
> The purpose of a bitmap index is not to partition an index, but to allow
> multiple indexes to be used in the same operation.
>
> For example, imagine you have a table on a dating website with 18 columns
> representing 18 different characteristics for matching. Imagine that you
> index each of those columns seperately. If you do:
>
> SELECT * FROM people WHERE orientation = 'gay' AND gender = 'male' AND city =
> 'San Francisco';

> ... then the planner can use an index on orientation OR on gender OR on city,
> but not all three. Multicolumn indexes are no solution for this use case
> because you'd have to create a multicolumn index for each possible combo of
> two or three columns ( 18! ).

I'm wondering if in some cases the following query could be more efficient

select * from people where orientation = 'gay'
intersect
select * from people where gender = 'male'
intersect
select * from people where city =

Regards
Gaetano Mendola

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-10-13 00:53:04 Re: [HACKERS] PGPASSWORD and client tools
Previous Message Bruce Momjian 2004-10-12 22:19:03 Re: [HACKERS] Need for DLLINIT in Makefile.shlib