Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C90EB1336FA7 for ; Sat, 26 Feb 2011 17:14:06 -0400 (AST) 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 95742-01 for ; Sat, 26 Feb 2011 21:13:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148150.authsmtp.net (outmail148150.authsmtp.net [62.13.148.150]) by mail.postgresql.org (Postfix) with ESMTP id 3D42F133616B for ; Sat, 26 Feb 2011 17:13:59 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p1QLDbhm067437; Sat, 26 Feb 2011 21:13:37 GMT Received: from Sidney-Stratton.local (70-36-197-225.dsl.dynamic.sonic.net [70.36.197.225]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p1QLDYvt002564; Sat, 26 Feb 2011 21:13:35 GMT Message-ID: <4D696CFE.2010107@agliodbs.com> Date: Sat, 26 Feb 2011 13:13:34 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Sam Wong CC: pgsql-performance@postgresql.org Subject: Re: Index use difference betweer LIKE, LIKE ANY? References: <01e801cbd4f0$5153d840$f3fb88c0$@hellosam.net> In-Reply-To: <01e801cbd4f0$5153d840$f3fb88c0$@hellosam.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 45f69fe4-41ed-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQL c1AAcB19PVdbHwkA AnYJWl5VU1dyXC1y axRSaxtca01QXQdv T0pMQFdNFEsoAH19 cndYFhlydQBAfDBy ZEJqEHReCkJzIxN5 X0pVQDkbZGY1aH0X UBJRagNUcgFMeh8X Ylh8AT1vNG8XDRoV JSEUBRUEdRRZJClF ChwWIBoeQEgFEyQx QRsPVT8iAVIISj97 Cz0FBxpUOGcyHw0b F2p2MQAA X-Authentic-SMTP: 61633136333939.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201102/502 X-Sequence-Number: 42640 On 2/25/11 5:31 AM, Sam Wong wrote: > I found that "LIKE", "= ANY (...)", "LIKE .. OR LIKE .." against a text > field used the index correctly, but not "LIKE ANY (...)". Would that be a > bug? No, it would be a TODO. This is a known limitation; it needs some clever code to make it work, and nobody's written it. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com