Skip site navigation (1) Skip section navigation (2)

Re: parameterized LIKE does not use index

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Kurt De Grave <Kurt(dot)DeGrave(at)student(dot)kuleuven(dot)ac(dot)be>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: parameterized LIKE does not use index
Date: 2005-06-22 21:08:55
Message-ID: 200506221408.55942.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
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?  Or can I convince the (Perl) driver to do so?

There should be an option to tell DBD::Pg not to cache a query plan.   
Let's see ....

yes.  pg_server_prepare=0, passed to the prepare() call.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

pgsql-performance by date

Next:From: Tobias BroxDate: 2005-06-23 01:06:04
Subject: Re: Performance Tuning Article
Previous:From: Kurt De GraveDate: 2005-06-22 19:25:20
Subject: parameterized LIKE does not use index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group