X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3F26FD1E123 for ; Wed, 31 Mar 2004 00:56:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 66944-08 for ; Tue, 30 Mar 2004 20:56:41 -0400 (AST) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 193E2D1E0F6 for ; Tue, 30 Mar 2004 20:56:38 -0400 (AST) Received: from [63.195.55.98] (HELO 192.168.1.29) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 4735894; Tue, 30 Mar 2004 16:57:59 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Palle Girgensohn , Tom Lane Subject: Re: LIKE should use index when condition doesn't include Date: Tue, 30 Mar 2004 16:56:09 -0800 User-Agent: KMail/1.5.4 Cc: pgsql-performance@postgresql.org References: <145170000.1080688008@palle.girgensohn.se> <26840.1080692204@sss.pgh.pa.us> <162280000.1080692911@palle.girgensohn.se> In-Reply-To: <162280000.1080692911@palle.girgensohn.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403301656.09664.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/433 X-Sequence-Number: 6289 Palle, > But what about ILIKE. It does not take advantage of indices built with > lower(): Nope. If you want to use a functional index, you'll need to use the function when you call the query. ILIKE is not somehow aware that it is equivalent to lower(). -- -Josh Berkus Aglio Database Solutions San Francisco