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

Re: One-Shot Plans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: One-Shot Plans
Date: 2011-08-01 17:39:32
Message-ID: 27870.1312220372@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> One of the things I was looking at doing was allowing the operator
> estimation functions mark the plan as "one-shot" if they used
> non-uniform data to predict the estimate. That would require most
> functions to observe the rule that if a plan is marked unsafe then
> nobody marks it safe again later. More of a guideline, really.

> For example, if we a doing a PK retrieval it will have a uniform
> distribution and so we can always use the final plan, whereas a plan
> that relates to a highly skewed distribution would be dangerous and so
> would be marked one-shot.

I fail to detect the sanity in that.  You seem to be confusing "skewed"
with "changing rapidly".  There's no reason to assume that a nonuniform
distribution is less stable than one that is uniform, and in any case we
already invalidate all plans related to a table after any update of the
statistics by ANALYZE.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Dean RasheedDate: 2011-08-01 17:42:53
Subject: Re: Compressing the AFTER TRIGGER queue
Previous:From: Robert HaasDate: 2011-08-01 17:36:09
Subject: Re: Compressing the AFTER TRIGGER queue

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