提高了将数据插入MySQL的性能 [英] improved performance of inserting data into MySQL

查看:171
本文介绍了提高了将数据插入MySQL的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将9000条记录插入本地Mysql,耗时约40秒。这是考虑快还是慢?

读取所有9000条记录只需不到1秒钟。



i遵循以下教程:< br $> b $ b

http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/

http:/ /dba.stackexchange.com/questions/20372/capabilities-of-innodb-insert-performance



但没有任何改进..

是否需要建议?

解决方案

插入需要的时间比检索时间长:必须检查约束并且必须更新索引。如果不了解表结构和代码,那么这样的差异就可以了。


i insert 9000 records to local Mysql, took around 40 seconds. is this consider fast or slow?
it only took less than 1 second to read all 9000 records.

i follow the tutorial from:

http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/
http://dba.stackexchange.com/questions/20372/capabilities-of-innodb-insert-performance

but nothing have improved..
anymore advice?

解决方案

Inserting takes longer than retrieving: constraints must be checked and indices must be updated. Without further knowledge on the table structure and your code, such a difference could be OK then.


这篇关于提高了将数据插入MySQL的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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