Re: partition wise aggregate wrong rows cost - Mailing list pgsql-hackers

From Tom Lane
Subject Re: partition wise aggregate wrong rows cost
Date
Msg-id 1418325.1653365785@sss.pgh.pa.us
Whole thread Raw
In response to Re: partition wise aggregate wrong rows cost  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Tue, 24 May 2022 at 15:38, bucoo <bucoo@sohu.com> wrote:
>> Normal aggregate and partition wise aggregate have a big difference rows cost:

> I wouldn't say this is a bug. Could you not say that they're both
> wrong given that your tables are empty?

We try fairly hard to ensure that the rowcount estimate for a given
relation does not vary across paths, so I concur with the OP that
this is a bug.  Having said that, I'm not sure that the consequences
are significant.  As you say, the estimates seem to get a lot closer
as soon as the table has some statistics.  (But nonetheless, they
are not identical, so it's still a bug.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: partition wise aggregate wrong rows cost
Next
From: Steve Chavez
Date:
Subject: Assert name/short_desc to prevent SHOW ALL segfault