From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Patric <lists@p-dw.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Reasonable amount of indices
Date: Thu, 06 Sep 2007 19:18:46 -0400
Message-ID: <5736.1189120726@sss.pgh.pa.us> (raw)
In-Reply-To: <20070906220940.GN8709@alvh.no-ip.org>
References: <46E05E4D.3010003@p-dw.com>
<20070906220940.GN8709@alvh.no-ip.org>
Alvaro Herrera <alvherre@commandprompt.com> writes:
> 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,
Right --- you'd be *far* better off using a small number of multicolumn
indexes. I wouldn't want to bet that the planner code scales
effectively to thousands of indexes, and even if it does, you're
throwing away any chance of using parameterized queries.
The update overhead is unpleasant to contemplate as well (or is this a
read-only table?)
regards, tom lane
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: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, lists@p-dw.com
Subject: Re: Reasonable amount of indices
In-Reply-To: <5736.1189120726@sss.pgh.pa.us>
* 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