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

Re: parameterized LIKE does not use index

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Kurt De Grave <Kurt(dot)DeGrave(at)student(dot)kuleuven(dot)ac(dot)be>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: parameterized LIKE does not use index
Date: 2005-06-23 14:18:54
Message-ID: 20050623141854.GA7505@wolff.to (view raw or flat)
Thread:
Lists: pgsql-performance
On Thu, Jun 23, 2005 at 10:33:18 +0200,
  Kurt De Grave <Kurt(dot)DeGrave(at)student(dot)kuleuven(dot)ac(dot)be> wrote:
> 
> Now it's tempting to dream of some mechanism that could make the
> database consider
> replanning the query automatically once it knows the parameter, or
> choose from
> a set of plans depending on the parameter. In this case the general plan
> was about three orders
> of magnitude slower than the specialized plan. But I guess this case is
> not all that common
> and the developer can work around it.

I remember some discussion about delaying planning until the first
actual query so that planning could use actual parameters to do
the planning. If you really want to have it check the parameters
every time, I think you will need to replan every time. I don't
know if there is a way to save some of the prepare working while
doing this.

In response to

Responses

pgsql-performance by date

Next:From: Michael StoneDate: 2005-06-23 14:44:52
Subject: Re: Performance Tuning Article
Previous:From: Frank WilesDate: 2005-06-23 13:48:54
Subject: Re: Performance Tuning Article

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