Re: multicolumn indexes still efficient if not fully stressed? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: multicolumn indexes still efficient if not fully stressed?
Date
Msg-id dcc563d10901121201p258bcdfcr88156653160a7466@mail.gmail.com
Whole thread Raw
In response to Re: multicolumn indexes still efficient if not fully stressed?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: multicolumn indexes still efficient if not fully stressed?
List pgsql-performance
On Mon, Jan 12, 2009 at 12:23 PM, Andreas Kretschmer
<akretschmer@spamfence.net> wrote:
> Jörg Kiegeland <kiegeland@ikv.de> schrieb:
>
>> Hello,
>>
>> I created a multicolumn index on the columns c_1,..,c_n .
>> If I do use only a true subset of these columns in a SQL query, is the
>> index still efficient?
>> Or is it better to create another multicolumn index defined on this subset?
>
> Create several indexes for each column, since 8.1 PG can use a so called
> Bitmap Index Scan. Read more about that:

I've found that when you do frequently query on two or more columns, a
multi-column index is faster than bitmap scans, especially for larger
data sets.

pgsql-performance by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: multicolumn indexes still efficient if not fully stressed?
Next
From: Alan Hodgson
Date:
Subject: Re: multicolumn indexes still efficient if not fully stressed?