Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 20031633F1C for ; Wed, 25 Feb 2009 20:31:33 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40550-06 for ; Wed, 25 Feb 2009 20:31:28 -0400 (AST) 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 95F82633F12 for ; Wed, 25 Feb 2009 20:31:28 -0400 (AST) 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 n1Q0VPtY007550; Wed, 25 Feb 2009 19:31:25 -0500 (EST) To: "Daniel J. Summers" cc: pgsql-admin@postgresql.org Subject: Re: "like" and index In-reply-to: <49A5DC53.7030107@djs-consulting.com> References: <8f750b7c0902250259w6065515as350aca3b5d7d8173@mail.gmail.com> <49A553B8.2040009@djs-consulting.com> <49A5B703.7080700@gmail.com> <49A5DC53.7030107@djs-consulting.com> Comments: In-reply-to "Daniel J. Summers" message dated "Wed, 25 Feb 2009 17:03:31 -0700" Date: Wed, 25 Feb 2009 19:31:25 -0500 Message-ID: <7549.1235608285@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/222 X-Sequence-Number: 31443 "Daniel J. Summers" writes: > MySQL will only use it if the wildcard isn't in the front (1) and > requires the MATCH keyword to search full-text indexes (2), Oracle > requires special "full-text" indexes to be able to use for LIKE (3) > (actually dealt with that at work a few months back), SQL Server only > uses it under certain conditions (4), and even PostgreSQL (the great > subject of this mailing list) doesn't do it with a standard index (5) - > you've got to use a special operator class. Only if you're using a non-C locale. regards, tom lane