postgreSQL database quickly insert data into the table 100000

Instead of creating a function, directly into one million data to the table fast

create table test (id int, info text);

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

select count (1) from test; - view the number of data

 

Guess you like

Origin blog.csdn.net/kwame211/article/details/91856845