Re: Calculage avg. width when operator = is missing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Calculage avg. width when operator = is missing
Date
Msg-id 943.1443014499@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calculage avg. width when operator = is missing  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Responses Re: Calculage avg. width when operator = is missing  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Calculage avg. width when operator = is missing  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
List pgsql-hackers
"Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de> writes:
> On Tue, Sep 22, 2015 at 11:56 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
> wrote:
>> It looks like a bug to me, but I think it might destabilize approved
>> execution plans(*), so it may not be such a great idea to back patch
>> branches that are already released.  I think HEAD + 9.5 is good.
>> 
>> (*) I hear there are even applications where queries and their approved
>> execution plans are kept in a manifest, and plans that deviate from that
>> raise all kinds of alarms.  I have never seen such a thing ...

> Ugh.  Anyway, do you expect any plans to change only due to avg. width
> estimation being different?  Why would that be so?

Certainly, eg it could affect a decision about whether to use a hash join
or hash aggregation through changing the planner's estimate of the
required hashtable size.  We wouldn't be bothering to track that data if
it didn't affect plans.

Personally I think Alvaro's position is unduly conservative: to the extent
that plans change it'd likely be for the better.  But I'm not excited
enough to fight hard about it.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Jeevan Chalke
Date:
Subject: Re: TEXT vs VARCHAR join qual push down diffrence, bug or expected?
Next
From: Alvaro Herrera
Date:
Subject: Re: Rework the way multixact truncations work