From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Patric <lists(at)p-dw(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Reasonable amount of indices |
Date: | 2007-09-06 23:18:46 |
Message-ID: | 5736.1189120726@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Alvaro Herrera <alvherre(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Carlo Stonebanks | 2007-09-07 00:06:44 | How planner decides left-anchored LIKE can use index |
Previous Message | Carlo Stonebanks | 2007-09-06 23:18:40 | Re: Performance on 8CPU's and 32GB of RAM |