X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 353D652825 for ; Wed, 22 Jun 2005 18:06:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15260-05 for ; Wed, 22 Jun 2005 21:06:55 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 39DA952806 for ; Wed, 22 Jun 2005 18:06:54 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7518513; Wed, 22 Jun 2005 14:09:03 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Kurt De Grave Subject: Re: parameterized LIKE does not use index Date: Wed, 22 Jun 2005 14:08:55 -0700 User-Agent: KMail/1.8 Cc: pgsql-performance@postgresql.org References: <42B9BB20.7050109@student.kuleuven.ac.be> In-Reply-To: <42B9BB20.7050109@student.kuleuven.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200506221408.55942.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/444 X-Sequence-Number: 13081 Kurt, > Of course, I could modify the application and send different SQL > depending on which case we're in or just constructing a query with a > literal each time, but is there a way to add a hint to the SQL that > would cause the query to be re-planned if it's a case that could use the > index? =A0Or can I convince the (Perl) driver to do so? There should be an option to tell DBD::Pg not to cache a query plan. =20 Let's see .... yes. pg_server_prepare=3D0, passed to the prepare() call. =2D-=20 =2D-Josh Josh Berkus Aglio Database Solutions San Francisco