What is the record limit for MySQL extended insert statement?

What is the write limit (n) of the MySQL extended insert statement?

INSERT INTO table (field) VALUES (1),(2),(n) 

What happens when the limit exceeds? Will only overflow lines be omitted or will the entire statement fail?

+6
source share
1 answer

I do not believe that there will be no hard limit on the number of inserted rows. However, there is a limit to the maximum size of a MySQL query; statements longer than the max_allowed_packet setting will be rejected by the server. (They will not start at all.)

MySQL 5.5.6 changed the default max_allowed_packet from 1 MB to 4 MB. This is just a little more. :)

+8
source

Source: https://habr.com/ru/post/900808/


All Articles