创建测试表
CREATE TABLE test
(
id integer,
test integer
)
WITH (
OIDS=FALSE
);
ALTER TABLE test
OWNER TO postgres;
插入数据
插入100w行值为0-1000的数据,
-- 插入100w行记录
insert into test SELECT generate_series(1,1000000) as key, (random()*(10^3))::integer;
CREATE TABLE test
(
id integer,
test integer
)
WITH (
OIDS=FALSE
);
ALTER TABLE test
OWNER TO postgres;
插入100w行值为0-1000的数据,
-- 插入100w行记录
insert into test SELECT generate_series(1,1000000) as key, (random()*(10^3))::integer;