create table t ( i int, j int, c varchar);
create table t2 (i int, j int, c varchar); 
insert into t values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t values (generate_series(100000,10000000), generate_series(100000,10000000), repeat('x',15));
insert into t2 values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t2 values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t2 values (generate_series(1,100000), generate_series(1,100000), repeat('x',5));
insert into t2 values (generate_series(100000,10000000), generate_series(100000,10000000), repeat('x',15));

set parallel_tuple_cost = 0;
set parallel_setup_cost = 0;
explain analyse select count(*) from t, t2 where t.i = t2.j and t.j > 100 group by t2.i order by t2.i ;

