> We try fairly hard to ensure that the row count 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 t
David Rowley writes:
> On Tue, 24 May 2022 at 15:38, bucoo 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
On Tue, 24 May 2022 at 15:38, bucoo wrote:
>
> Normal aggregate and partition wise aggregate have a big difference rows cost:
> explain (verbose)
> select count(1) from t1 group by id;
> HashAggregate (cost=106.20..108.20 rows=200 width=12) --here rows is 200
> set enable_partitionwise_aggregat
Normal aggregate and partition wise aggregate have a big difference rows cost:
begin;
create table t1(id integer, name text) partition by hash(id);
create table t1_0 partition of t1 for values with(modulus 3, remainder 0);
create table t1_1 partition of t1 for values with(modulus 3, remainder 1);