Indexing strategy

From: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Indexing strategy
Date: 2011-04-17 08:52:35
Message-ID: BANLkTikE5JuwKFTzyy2Kq9+NHkct8fhLEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Need some help here. I have a large table (200 million rows already).

There are two columns.

ColA
ColB

There is an index on ColA. It's an important column.

ColB is a boolean. Either 1 or 0.

For about 10% of the data, ColB is 1. Otherwise it's default is 0.

Now, my question: for that 10%, is it worth adding a conditional index
on "ColA WHERE ColB = 1"? Will this save time for the queries that are
related to 10% of my data where the ColB is 1? Or will the main
leading index on ColA already speed things up as much as it can?

Thanks for any ideas!

PK

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henry C. 2011-04-17 08:55:02 Re: SSDs with Postgresql?
Previous Message Madan Thapa 2011-04-17 01:32:55 postgresql tablefunc library error