Re: Indexing columns with low cardinality: persistent bitmap indexes? - Mailing list pgsql-general

From Jaime Casanova
Subject Re: Indexing columns with low cardinality: persistent bitmap indexes?
Date
Msg-id 3073cc9b0901121320o704e7510oa701edab642e4bab@mail.gmail.com
Whole thread Raw
In response to Re: Indexing columns with low cardinality: persistent bitmap indexes?  (Reg Me Please <regmeplease@gmail.com>)
Responses Re: Indexing columns with low cardinality: persistent bitmap indexes?
List pgsql-general
On Mon, Jan 12, 2009 at 4:16 PM, Reg Me Please <regmeplease@gmail.com> wrote:
> On Monday 12 January 2009 21:38:02 Bruno Lavoie wrote:
>> Hello,
>>
>> I have a column with a small number of distinct values, indexing this
>> one with a standard BTree is useless. How do I  can index this column
>> efficiently? I searched and it seems that pg doesn't support the
>> creation of persistent bitmap indexes... Is that feature planned in next
>> releases of pg?
>>
>> Thanks
>> Bruno Lavoie
>
> I would try partial indexes, as many as the distinct values.
> I'm not sure this would help, though.
>

you should create partial indexes only on those values that are a
lower fraction on the table
ie: if you have

value     "fraction of the table that has this value"
1                5%
2                3%
3               20%
4               25%
5               47%

then only partial indexes on values 1 and 2 are of some value

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

pgsql-general by date:

Previous
From: Reg Me Please
Date:
Subject: Re: Indexing columns with low cardinality: persistent bitmap indexes?
Next
From: "Scott Marlowe"
Date:
Subject: Re: Indexing columns with low cardinality: persistent bitmap indexes?