Mysql dump as small bulk insert In mysql (8.0), there is a table with over 10 million rows, I want to dump it as bulk insert sql.
I wish each insert sql contains maybe 1k or 10k rows, so that could execute the sql file quickly, overall.
So how to do such a dump ?
mysqldump has a&quot;WJERE&quot; clause in which can specify which data or number you want
mysqldump --opt --where=&quot;1 limit 1000000&quot; database table &gt; yourdumplimited.sql

or you can LIMIT byy time
 --where &quot;your_date BETWEEN '2020-01-01' AND '2020-06-30'&quot;

You can divide your table into fragmentss which you need.