如何确定MySQL中的最大事务大小? [英] How do I determine maximum transaction size in MySQL?

查看:894
本文介绍了如何确定MySQL中的最大事务大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处中看到了针对PostgreSQL的相同问题;想知道是否有人知道(a)响应的MySQL风格,以及(b)我将检查哪些MySQL选项来确定/影响答案.

Saw the same question posited for PostgreSQL here; wondering if anyone knows (a) the MySQL flavour of the response and (b) which MySQL options I would examine to determine/influence the answer.

我并不需要一个绝对的答案,但是如果我建议插入200,000行〜2Kb,您会认为这很简单,还是稍微增加了限制?

I don't need an absolute answer btw, but if I were to propose inserting, say, 200,000 rows of ~2Kb each would you consider that very straightforward, or pushing the limit a bit?

假设MySQL运行在配置良好的Linux机器上,该机器具有4Gb的RAM,减少的磁盘空间以及由通常知道自己在做什么的人调整的实例!

Assume MySQL is running on a well specced Linux box with 4Gb of RAM, shedloads of disk space, and an instance tuned by someone who generally knows what they're doing!

欢呼

布莱恩

推荐答案

对于Innodb,事务大小将受重做日志(ib_logfile *)大小的限制,因此,如果您打算提交非常大的事务,请确保设置innodb_log_file_size = 256M或更多.缺点是万一发生崩溃,恢复时间会更长.

For Innodb the transaction size will be limited by the size of the redo log (ib_logfile*), so if you plan to commit very large transactions make sure you set innodb_log_file_size=256M or more. The drawback is that it will take longer to recover in case of crash.

记录在案的Innobase员工建议您保持交易

But for the record Innobase employees recommend keeping you transactions short

这篇关于如何确定MySQL中的最大事务大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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