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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Avoiding bad prepared-statement plans.


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Robert Haas <robertmhaas(at)gmail(dot)com>
  • Cc: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, Jeroen Vermeulen <jtv(at)xs4all(dot)nl>, Alex Hunsaker <badalex(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Bart Samwel <bart(at)samwel(dot)tk>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: Avoiding bad prepared-statement plans.
  • Date: Sat, 27 Feb 2010 23:22:00 -0500
  • Message-id: <25921.1267330920@sss.pgh.pa.us> <text/plain>

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Feb 26, 2010 at 7:03 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group