Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5886F632D98 for ; Wed, 4 Aug 2010 13:58:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 95846-06 for ; Wed, 4 Aug 2010 16:58:05 +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 0D3CA632400 for ; Wed, 4 Aug 2010 13:58:05 -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 o74Gw5Ol021548; Wed, 4 Aug 2010 12:58:05 -0400 (EDT) To: "Kevin Grittner" cc: pgsql-performance@postgresql.org Subject: Re: LIKE without wildcard different from = In-reply-to: <4C59547802000025000341CA@gw.wicourts.gov> References: <4C59503402000025000341C0@gw.wicourts.gov><4C59503402000025000341C0@gw.wicourts.gov> <21079.1280940107@sss.pgh.pa.us> <4C59547802000025000341CA@gw.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Wed, 04 Aug 2010 11:52:24 -0500" Date: Wed, 04 Aug 2010 12:58:05 -0400 Message-ID: <21547.1280941085@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: 201008/46 X-Sequence-Number: 39889 "Kevin Grittner" writes: > To be clear, though, the problem isn't that it didn't turn a LIKE > with no wildcard characters into an equality test, it's that it > would have been three orders of magnitude faster (because of an > available index with an opclass specification) if it had treated an > equality test as a LIKE. Ah. Well, the real fix for that is also in 8.4: we got rid of the separate ~=~ operator, so a text_pattern_ops index is now usable for plain =. regards, tom lane