How do I determine maximum transaction size in MySQL?(如何确定 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 中的最大事务大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何确定 MySQL 中的最大事务大小?


- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- SQL 临时表问题 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01