Re: multicolumn indexes still efficient if not fully stressed?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Andreas Kretschmer" <akretschmer(at)spamfence(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: multicolumn indexes still efficient if not fully stressed?
Date: 2009-01-12 20:01:46
Message-ID: dcc563d10901121201p258bcdfcr88156653160a7466@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jan 12, 2009 at 12:23 PM, Andreas Kretschmer
<akretschmer(at)spamfence(dot)net> wrote:
> Jörg Kiegeland <kiegeland(at)ikv(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alan Hodgson 2009-01-12 20:17:47 Re: multicolumn indexes still efficient if not fully stressed?
Previous Message Andreas Kretschmer 2009-01-12 19:23:25 Re: multicolumn indexes still efficient if not fully stressed?