怎样提升mysql写入速度,如何提高MySQL数据库每秒InnoDB写入速度

On my server, doing insert records into MySQL DB is very slow. Regarding the Server Status, InnoDB writes per second is around 20.

I am not an expert, just graduated from university. I don't have much experience on it.

How could I improve the speed of InnoDB writes? If doesn't upgrade the hardware of my server, is there any way can do it?

My server is not good, so I installed Microsoft windows server 2003 R2. The hardware info is following:

CPU: Intel Xeon E5649 2.53GHZ

RAM: 2GB

Any comments, Thank you.

解决方案

Some hints:

Minimize the number of indexes - there will be less index maintenance. This is obvously a trade-off with SELECT performance.

Maximize the number of INSERTs per transaction - the "durability price" will be less (i.e. physical writing to disk can be done in the background while the rest of the transaction is still executing, if the transaction is long enough). One large transaction will usually be faster than many small transaction, but this is obviously contingent on the actual logic you are trying to implement.

Move the table to a faster storage, such as SSD. Reads can be cached, but a durable transaction must be physically written to disk, so just caching is not enough.

Also, it would be helpful if you could show us your exact database structure and the exact INSERT statement you are using.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值