\timing on
create table test ( id bigint );
-- each insert is 256 MiB piece
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
insert into test select generate_series(1, 7376640);
create index test_idx on test(id);
vacuum analyse test;

select version();
set max_parallel_workers_per_gather = 0
explain analyse select * from test order by id;
explain analyse select * from test order by id;
explain analyse select * from test order by id;

select version();
set max_parallel_workers_per_gather = 8;
explain analyse select count(*) from test;
explain analyse select count(*) from test;
explain analyse select count(*) from test;
