Re: Avoiding bad prepared-statement plans.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Mark Mielke <mark@mark.mielke.cc>, Jeroen Vermeulen <jtv@xs4all.nl>, Alex Hunsaker <badalex@gmail.com>, Greg Stark <gsstark@mit.edu>, Bart Samwel <bart@samwel.tk>, Pavel Stehule <pavel.stehule@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-02-28T04:22:00Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > On Fri, Feb 26, 2010 at 7:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Wouldn't it be better if it just did the right thing automatically? >> >> The sort of heuristic I'm envisioning would essentially do "replan every >> time" for some number of executions, and give up only if it noticed that >> it wasn't getting anything better than the generic plan. So you'd have >> a fixed maximum overhead per session when the custom plan was useless, >> and the Right Thing when it wasn't. > Which is likely useless for my use case. [ shrug... ] You'd better explain exactly why, if you want me to take that objection seriously. regards, tom lane