1

I used this command mysqldump -u root -p etl_db > ~/backup.sql to get the backup data.

Now I want to import into a new remote MySQL database. I saw there are 2 ways to do it. https://dev.mysql.com/doc/refman/8.0/en/mysql-batch-commands.html

I wonder which one would be faster?

shell> mysql < dump.sql or mysql> source dump.sql?

I saw some people says that source is for small data but there are others say that it's good for large data. I couldn't find much documentation.

Thanks!

wwwwan
  • 407
  • 1
  • 4
  • 12
  • 1
    There is no reason for it to be any different in speed reading the dump, and the database inserts will be the limiting factor, not the speed of reading the dump. – user207421 Apr 21 '19 at 01:19
  • @user207421is there any way to improve the speed to insert? – wwwwan Apr 21 '19 at 05:37

0 Answers0