David Rowley <dgrowle...@gmail.com> writes: > On Tue, 24 May 2022 at 15:38, bucoo <bu...@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