我的目标是插入100000000万条数据
经过实际操作,用以下方法,能在4分钟完成
复制代码
1
2
3
4
5
6
7
8
9
10
11
12declare ii integer; begin II:=1; FOR ii IN 1..100000000 LOOP INSERT INTO test1(id, test1, test2, test3, test4, test5, test6, test7, test8, test9) VALUES( ii, 'test1', 'test2', 'test3', 'test4', 'test5', 'test6', 'test7', 'test8', 'test9'); end loop; return true; end;
创建存储过程
然后运行
复制代码
1select * from creatData2() as tab;
最后
以上就是拉长跳跳糖最近收集整理的关于往postgre插入大量数据的全部内容,更多相关往postgre插入大量数据内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复