drop table pgbench_accounts cascade;
\! pgbench postgres -i -s 100

CREATE TABLE pgbench_accounts_1 (CHECK (bid >= 1 and bid <= 33)) INHERITS (pgbench_accounts);
WITH del AS (DELETE FROM pgbench_accounts WHERE bid >= 1 and bid <= 33 RETURNING *) INSERT INTO pgbench_accounts_1 SELECT * FROM del;
analyze pgbench_accounts_1;
CREATE TABLE pgbench_accounts_2 (CHECK (bid >= 34 and bid <= 66)) INHERITS (pgbench_accounts);
WITH del AS (DELETE FROM pgbench_accounts WHERE bid >= 34 and bid <= 66 RETURNING *) INSERT INTO pgbench_accounts_2 SELECT * FROM del;
analyze pgbench_accounts_2;
CREATE TABLE pgbench_accounts_3 (CHECK (bid >= 67 and bid <= 100)) INHERITS (pgbench_accounts);
WITH del AS (DELETE FROM pgbench_accounts WHERE bid >= 67 and bid <= 99 RETURNING *) INSERT INTO pgbench_accounts_3 SELECT * FROM del;
analyze pgbench_accounts_3;

drop table bid_tab;
create table bid_tab (bid integer, bid_info1 varchar, bid_info2 varchar);
insert into bid_tab (bid) select generate_series(99, 50000000, 1);
analyze bid_tab;
