MySQL Insert 20K rows in single insert

前端 未结 3 1214
盖世英雄少女心
盖世英雄少女心 2020-12-11 03:37

In my table I insert around 20,000 rows on each load. Right now I am doing it one-by-one. From mysql website I came to know inserting multiple rows with single insert query

3条回答
  •  情歌与酒
    2020-12-11 04:19

    batch insert with SQL: insert into table (col...coln) values (col... coln),(col...coln)... but the SQL length is limited by 1M default, you can change max_allowed_packet parameter to support more bigger single insert

提交回复
热议问题