postgres=# CREATE TABLE rtbl (
a int,
b int,
t text,
x float,
y float
);
CREATE TABLE
postgres=# INSERT INTO rtbl (SELECT code AS a, (code * 100 * random())::int % 57 AS b,
md5(code::text) || ' is check sum of code: ' || code AS d,
1000 * random() AS x, 1000 * random() AS y
FROM generate_series(1,1110000) code);
INSERT 0 1110000
postgres=# \timing
启用计时功能.
postgres=# select count(*) from rtbl;
count
---------
1110000
(1 行记录)
时间:184.499 ms
浙公网安备 33010602011771号