0

I wonder if importing a script with mysql CLI is faster than use a Linux CLI, let me explain what I mean here:

This:
- mysql -uroot -ppass then use this source dump_script.sql
is faster/slower of this:
- mysql -uroot -ppass < dump_script.sql

I'm importing a 9gb db and I'm trying to avoid mistake :)

Also what about http://www.percona.com/ toolkit ? there is any valid tool to fast import a db ?

4

1 回答 1

1

简单的回答:没有区别。

这两种方法都受到 MySQL 的插入速度而不是文件系统或磁盘读取性能的限制。您在 MySQL 如何将数据加载到表中的两种方法之间没有区别。

如果您从转储文件导入,则它是单线程操作。如果您可以使用 MyDumper (http://www.mydumper.org/) 之类的工具,它可以一次使用多个连接恢复数据,这会明显更快。

于 2012-12-18T07:06:53.680 回答