Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EA9281337BF9 for ; Wed, 6 Apr 2011 01:44:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 45370-04 for ; Wed, 6 Apr 2011 04:44:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 638A51337BA8 for ; Wed, 6 Apr 2011 01:44:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p364iM7c004332; Wed, 6 Apr 2011 00:44:22 -0400 (EDT) To: Thom Brown cc: pgsql-performance Subject: Re: Partial index slower than regular index In-reply-to: References: Comments: In-reply-to Thom Brown message dated "Tue, 05 Apr 2011 23:35:29 +0100" Date: Wed, 06 Apr 2011 00:44:22 -0400 Message-ID: <4331.1302065062@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/38 X-Sequence-Number: 43100 Thom Brown writes: > The index doesn't get used. There's probably a logical explanation, > which is what I'm curious about. Er ... it's broken? It looks like the index predicate expression isn't getting the right collation assigned, so predtest.c decides the query doesn't imply the index's predicate. Too tired to look into exactly why right now, but it's clearly bound up in all the recent collation changes. regards, tom lane