Re: Reasonable amount of indices - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Reasonable amount of indices
Date
Msg-id 20070906220940.GN8709@alvh.no-ip.org
Whole thread Raw
In response to Reasonable amount of indices  (Patric <lists@p-dw.com>)
Responses Re: Reasonable amount of indices
List pgsql-performance
Patric wrote:

>    My Question now is: Is it wise to do so, and create hundreds or maybe
> thousands of Indices
>    which partition the table for the selections.

No, this is not helpful -- basically what you are doing is taking the
first level (the first couple of levels maybe) of the index out of it,
and charging the planner with the selection of which one is the best for
each query.

Of course, I am assuming you were simplifing your queries and don't
actually store the name of the continent etc on each on every row.
Because if you actually do that, then there's your first oportunity for
actual optimization (which happens to be a more normalized model), far
more effective than the partial indexes you are suggesting.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-performance by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Performance on 8CPU's and 32GB of RAM
Next
From: "Scott Marlowe"
Date:
Subject: Re: SAN vs Internal Disks