On Wed, Apr 21, 2010 at 11:30 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> On Tue, Apr 20, 2010 at 5:05 PM, Kris Jurka <books@xxxxxxxxxx> wrote:>>> ... There are three ways to plan a PreparedStatement:
FWIW, I think there is some consensus to experiment (in the 9.1 cycle)
with making the server automatically try replanning of parameterized
queries with the actual parameter values substituted. It'll keep doing
so if it finds that that produces a significantly better plan than the
generic parameterized plan; which is what you'd expect if there's a
chance to optimize a LIKE search, eliminate partitions, etc.
regards, tom lane
That'd be wonderful.