美文网首页
五十万数据插入数据库应对方案

五十万数据插入数据库应对方案

作者: 秸秆混凝烧结工程师 | 来源:发表于2022-03-01 14:39 被阅读0次

使用事务而不是一条一条的SQL“

image.png

START TRANSACTION;

INSERT INTO insert_table (datetime, uid, content, type) VALUES ('0', 'userid_0', 'content_0', 0);
INSERT INTO insert_table (datetime, uid, content, type) VALUES ('1', 'userid_1', 'content_1', 1);
...
COMMIT;

https://www.cnblogs.com/myseries/p/11191134.html

相关文章

网友评论

      本文标题:五十万数据插入数据库应对方案

      本文链接:https://www.haomeiwen.com/subject/qvwdrrtx.html