Re: improving GROUP BY estimation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: improving GROUP BY estimation
Date
Msg-id 7900.1459457981@sss.pgh.pa.us
Whole thread Raw
In response to Re: improving GROUP BY estimation  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> Yeah, that makes sense. In fact, if we only apply the adjustment when
> reldistinct > 0 and rel->rows < rel->tuples, and rewrite the first
> argument to pow() as (rel->tuples - rel->rows) / rel->tuples, then it
> is guaranteed to be non-negative. If rel->rows >= rel->tuples (not
> sure if it can be greater), then we just want the original
> reldistinct.

Works for me.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: improving GROUP BY estimation
Next
From: Tom Lane
Date:
Subject: Re: improving GROUP BY estimation