mysql批量插入之提高插入效率

时间:2023-11-10 09:16:19

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);

修改成:

INSERT INTO insert_table (datetime, uid, content, type)

VALUES ('0', 'userid_0', 'content_0', 0), ('1', 'userid_1', 'content_1', 1);

效率瞬间提高