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

Indexes on low cardinality columns

From: Vikul Khosla <vkhosla(at)gridsolv(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Indexes on low cardinality columns
Date: 2009-10-16 23:36:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

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 :)



pgsql-performance by date

Next:From: Greg StarkDate: 2009-10-17 01:27:15
Subject: Re: Indexes on low cardinality columns
Previous:From: Alvaro HerreraDate: 2009-10-16 22:01:56
Subject: Re: UUID as primary key

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