Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 929AF2E005F for ; Wed, 26 Mar 2008 12:15:32 -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 54811-10 for ; Wed, 26 Mar 2008 12:15:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from morework.geizhals.at (home.geizhals.at [213.229.14.34]) by postgresql.org (Postfix) with ESMTP id CB3762E005E for ; Wed, 26 Mar 2008 12:15:28 -0300 (ADT) Received: from localhost (morework [127.0.0.1]) by morework.geizhals.at (Postfix) with ESMTP id 5934A18C191 for ; Wed, 26 Mar 2008 16:15:27 +0100 (CET) X-Virus-Scanned: amavisd-new at geizhals.at Received: from morework.geizhals.at ([127.0.0.1]) by localhost (morework.geizhals.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8z-5vlL9gWVi for ; Wed, 26 Mar 2008 16:15:19 +0100 (CET) Received: from [172.16.43.6] (unknown [172.16.43.6]) by morework.geizhals.at (Postfix) with ESMTP for ; Wed, 26 Mar 2008 16:15:19 +0100 (CET) Message-ID: <47EA6888.2050506@geizhals.at> Date: Wed, 26 Mar 2008 16:15:20 +0100 From: Marinos Yannikos User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: 1-/2-dimensional indexes for common columns, rationale? References: <47EA5B4D.5000300@geizhals.at> <20080326150208.GH27264@a-kretschmer.de> In-Reply-To: <20080326150208.GH27264@a-kretschmer.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/486 X-Sequence-Number: 29440 A. Kretschmer schrieb: >> create index foo1 on bla (a); >> create index foo2 on bla (b); >> create index foo3 on bla (a,b); >>[...] > > Which version do you have? Since 8.1 pg can use a so called 'bitmap > index scan', because of this feature i guess you don't need the index > foo3. (if you have 8.1 or higher) 8.3.1 - foo3 is being used though in presence of both foo1 and foo2, so I'd suppose that it's a better choice even with bitmap index scan available... -mjy