Skip site navigation (1) Skip section navigation (2)

Re: Indexes on low cardinality columns

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: Vikul Khosla <vkhosla(at)gridsolv(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Indexes on low cardinality columns
Date: 2009-10-19 13:59:43
Message-ID: 4ADC70CF.8040600@cheapcomplexdevices.com (view raw or flat)
Thread:
Lists: pgsql-performance
If the table can be clustered on that column, I suspect
it'd be a nice case for the grouped index tuples patch
http://community.enterprisedb.com/git/

Actually, simply clustering on that column might give
major speedups anyway.

Vikul Khosla wrote:
> Folks,
> 
> We have just migrated from Oracle to PG.
> 
> We have a database that has approx 3 mil rows and one of the columns has
> a cardinality
> of only 0.1% (3000 unique values).
> 
> We have to issue several queries that use this low cardinality column in
> a WHERE clause
> as well as see this column participating in JOINS (ouch!).
> 
> A regular B-Tree index has been created on these columns.
> 
> In Oracle, we replaced the B-Tree Indexes with Bitmap indexes and saw
> performance go
> through the roof. I know Postgres does not have Bitmap indexes,
> but is there a reasonable alternative to boost performance in situations
> where low cardinality
> columns are involved ?
> 
> I dont have the option of changing schemas - so please dont go there :)
> 
> TIA,
> VK


In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2009-10-19 16:01:17
Subject: Re: Calculation of unused columns
Previous:From: Grzegorz JaƛkiewiczDate: 2009-10-19 13:46:58
Subject: Re: Known Bottlenecks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group