Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7F4EB9FA57A for ; Thu, 6 Sep 2007 20:19:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 32759-02 for ; Thu, 6 Sep 2007 20:19:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A732C9FB523 for ; Thu, 6 Sep 2007 20:18:58 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l86NIkp8005737; Thu, 6 Sep 2007 19:18:46 -0400 (EDT) To: Alvaro Herrera cc: Patric , pgsql-performance@postgresql.org Subject: Re: Reasonable amount of indices In-reply-to: <20070906220940.GN8709@alvh.no-ip.org> References: <46E05E4D.3010003@p-dw.com> <20070906220940.GN8709@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 06 Sep 2007 18:09:40 -0400" Date: Thu, 06 Sep 2007 19:18:46 -0400 Message-ID: <5736.1189120726@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/106 X-Sequence-Number: 26651 Alvaro Herrera 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