From: | "Luke Lonergan" <llonergan(at)greenplum(dot)com> |
---|---|
To: | "Oscar Picasso" <oscgoogle(at)yahoo(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Better index stategy for many fields with few |
Date: | 2006-04-12 22:38:14 |
Message-ID: | C062CF66.216D1%llonergan@greenplum.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Oscar,
On 4/10/06 9:58 AM, "Oscar Picasso" <oscgoogle(at)yahoo(dot)com> wrote:
> - My items table:
> code int -- can take one of 100 values
> property varchar(250) -- can take one of 5000 values
> param01 char(10) -- can take one of 10 values
> param02 char(10) -- can take one of 10 values
> ...
> [ 20 similar columns }
> ...
> parama20 char(10) -- can take one of 10 values
>
> - The kind of query I want to optimize:
> select * from items
> where code betwwen 5 and 22
> and param01 = 'P'
> and param02 = 'G'
> ...
> [ all the 20 paramXX columns are used in the query}
> ...
> and param20 = 'C';
Bizgres 0.9 has an on-disk bitmap index which will likely improve this query
speed by a very large amount over normal Postgres 8.1.
- Luke
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2006-04-12 22:49:14 | Re: bad performance on Solaris 10 |
Previous Message | Luke Lonergan | 2006-04-12 22:35:33 | Re: bad performance on Solaris 10 |