create table t1 (a int primary key, b int); insert into t1 (select i, i from generate_series(1, 10000000) as i); analyze;