Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Do this 3 times, compile 3 times in MySQL
The statements like that
Insert INTO table values
(NULL, ' abc ', ' 123@qq.com '),
(NULL, ' abc ', ' 123@qq.com '),
(NULL, ' abc ', ' 123@qq.com ');
How many times are you compiling in MySQL? 1 times or 3 times.
Reply content:
Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Insert into table values (NULL, ' abc ', ' 123@qq.com ');
Do this 3 times, compile 3 times in MySQL
The statements like that
Insert INTO table values
(NULL, ' abc ', ' 123@qq.com '),
(NULL, ' abc ', ' 123@qq.com '),
(NULL, ' abc ', ' 123@qq.com ');
How many times are you compiling in MySQL? 1 times or 3 times.
The kernel is not so thoroughly researched, so the concrete implementation of the two is not particularly clear.
But it is very certain that the bulk insert efficiency is high, SQL parsing is by the statement, so your first example is to parse 3 SQL statements, the second example is to parse 1 SQL statements
From the IO consumption, each SQL statement is written once binlog, so the bulk insert as long as write once, if the insert more, the performance difference will be greater