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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Stone | 2005-06-23 14:44:52 | Re: Performance Tuning Article |
Previous Message | Frank Wiles | 2005-06-23 13:48:54 | Re: Performance Tuning Article |