加快mysql转储和导入 [英] Speeding up mysql dumps and imports

查看:76
本文介绍了加快mysql转储和导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何文献记载的技术可以加快mySQL转储和导入的速度?

Are there any documented techniques for speeding up mySQL dumps and imports?

这将包括my.cnf设置,使用虚拟磁盘等.

This would include my.cnf settings, using ramdisks, etc.

仅查找记录在案的技术,最好使用基准测试来显示潜在的加速效果.

Looking only for documented techniques, preferably with benchmarks showing potential speed-up.

推荐答案

http://www.maatkit.org/具有mk-parallel-dump和mk-parallel-restore

http://www.maatkit.org/ has a mk-parallel-dump and mk-parallel-restore

如果您一直希望使用多线程的mysqldump,请不要再希望了.该工具并行转储MySQL表.它是一个更加智能的mysqldump,可以充当mysqldump的包装器(具有合理的默认行为),也可以充当SELECT INTO OUTFILE的包装器.它专为处理速度非常重要的超大数据量的高性能应用而设计.它利用多个CPU和磁盘来更快地转储数据.

If you’ve been wishing for multi-threaded mysqldump, wish no more. This tool dumps MySQL tables in parallel. It is a much smarter mysqldump that can either act as a wrapper for mysqldump (with sensible default behavior) or as a wrapper around SELECT INTO OUTFILE. It is designed for high-performance applications on very large data sizes, where speed matters a lot. It takes advantage of multiple CPUs and disks to dump your data much faster.

mysqldump中还有许多潜在的选项,例如在导入转储时不创建索引-而是在完成时按顺序进行索引.

There are also various potential options in mysqldump such as not making indexes while the dump is being imported - but instead doing them en-mass on the completion.

这篇关于加快mysql转储和导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆