1. 程式人生 > >postgreSQL資料庫 向表中快速插入1000000條資料

postgreSQL資料庫 向表中快速插入1000000條資料

不用建立函式,直接向表中快速插入1000000條資料

create table tbl_test (id int, info text, c_time timestamp);

insert into tbl_test select generate_series(1,100000),md5(random()::text),clock_timestamp();

select count(id) from tbl_test;  --檢視個數據條數