Re: improving GROUP BY estimation

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improving GROUP BY estimation
Date: 2016-02-26 04:03:34
Message-ID: 56CFCE96.5080306@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 02/26/2016 04:32 AM, Mark Dilger wrote:
>
>> On Feb 25, 2016, at 4:59 PM, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>>
...
>>
>> The culprit here is that the two columns are not independent, but
>> are (rather strongly) correlated due to the way you've generated
>> the data.
>
> Yes, that was intentional. Your formula is exactly correct, so far as
> i can tell, for completely uncorrelated data. I don't have any tables
> with completely uncorrelated data, and was therefore interested in
> what happens when the data is correlated and your patch is applied.
>
> BTW, the whole reason I responded to your post is that I think I would like
> to have your changes in the code base. I'm just playing Devil's Advocate
> here, to see if there is room for any improvement.

Sure, that's how I understood it. I just wanted to point out the
correlation, as that might not have been obvious to others.

> Thanks for the patch submission. I hope my effort to review it is on
> the whole more helpful than harmful.

Thanks for the feedback!

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-02-26 04:17:26 Re: IF (NOT) EXISTS in psql-completion
Previous Message Kyotaro HORIGUCHI 2016-02-26 03:58:58 Re: Incorrect formula for SysV IPC parameters