pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Patric <lists@p-dw.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Reasonable amount of indices
Date: Thu, 6 Sep 2007 18:09:40 -0400
Message-ID: <20070906220940.GN8709@alvh.no-ip.org> (raw)
In-Reply-To: <46E05E4D.3010003@p-dw.com>
References: <46E05E4D.3010003@p-dw.com>

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.



view thread (3+ messages)  latest in thread

Message-ID: <20070906220940.GN8709@alvh.no-ip.org>
Permalink:  ../20070906220940.GN8709@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20070906220940.GN8709@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, lists@p-dw.com
  Subject: Re: Reasonable amount of indices
  In-Reply-To: <20070906220940.GN8709@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox