Re: Better index stategy for many fields with few

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oscar,

On 4/10/06 9:58 AM, "Oscar Picasso" <oscgoogle@xxxxxxxxx> 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




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux