Re: Speeding up LIKE with placeholders? - Mailing list pgsql-general

From Greg Stark
Subject Re: Speeding up LIKE with placeholders?
Date
Msg-id 87u0u4xiom.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Speeding up LIKE with placeholders?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:

> Kinda ironic that a seemingly very nice feature (seperating query from
> arguments) has such a side-effect (less information for planner).

It was an known and expected downside.

But there is an upside too. For me it's actually a benefit, because it means
I'm less likely to called in the middle of the night because the web site when
someone entered some unusual parameters and caused a bad plan.

Whatever plan it's using when I test it will be the same as the plan it uses
for others, which may not be ideal but it won't be a surprise and I can
anticipate whether it'll be a reasonable plan in the future.

I can't anticipate all the potential plans the database might come up with for
all the possible parameters.

--
greg

pgsql-general by date:

Previous
From: Kevin Barnard
Date:
Subject: Re: What is the postgres version of mysql's "ON DUPLICATE KEY"
Next
From: Christopher Browne
Date:
Subject: Re: Synchronizing Databases