--#Base table create table normal_table as select * from generate_series(1, 1000000) a; --#Partitioning table create table hoge as select a from generate_series(0, 40000) a; create table hoge2( a integer ) partition by range(a); create table hoge2_10000 partition of hoge2 for values from (0) to (10000); create table hoge2_20000 partition of hoge2 for values from (10000) to (20000); create table hoge2_30000 partition of hoge2 for values from (20000) to (30000); create table hoge2_default partition of hoge2 default; insert into hoge2 select * from hoge; --#Ext stats and Indexes \! pgbench -i create statistics pg_acc_ext (dependencies, mcv, ndistinct) ON aid, bid from pgbench_accounts ;