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

Re: Avoiding bad prepared-statement plans.

From: Yeb Havinga <yebhavinga(at)gmail(dot)com>
To: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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: 2010-02-26 20:46:27
Message-ID: 4B883323.5090701@gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Mark Mielke wrote:
> On 02/26/2010 03:11 PM, Yeb Havinga wrote:
>> Or instead of letting users give the distribution, gather it 
>> automatically in some plan statistics catalog? I suspect in most 
>> applications queries stay the same for months and maybe years, so 
>> after some number of iterations it is possible to have decent call 
>> statistics / parameter distributions. Maybe the the parameter value 
>> distribution could even be annotated with actual cached plans.
>
> The problem with the last - actual cached plans - is that it implies 
> the other aspect I have been suggesting: In order to have a custom 
> cached plan, the primary model must be to use custom plans. If 
> PREPARE/EXECUTE uses generic plans normally, than the only cached 
> plans available will be generic plans.
I should have been clearer, with 'actual cached plans' I meant 'cached 
plans planned with actual parameters' or 'cached custom plans'. It makes 
no sense to annotate points or intervals in a gathered value 
distribution with generic plans.

regards,
Yeb Havinga


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-02-26 20:47:55
Subject: Re: Avoiding bad prepared-statement plans.
Previous:From: Tom LaneDate: 2010-02-26 20:30:01
Subject: Re: Hot Standby query cancellation and Streaming Replication integration

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group