hanchuanchuan / goInception

一个集审核、执行、备份及生成回滚语句于一身的MySQL运维工具
https://hanchuanchuan.github.io/goInception/
GNU General Public License v3.0
1.6k stars 545 forks source link

优化MySQL generated virtual column 改表消耗 #609

Closed hjweddie closed 9 months ago

hjweddie commented 9 months ago

根据MySQL 5.7及8.0官方文档所示,对添加generated virtual column 为 Only Modifies Medadata。我认为无需经过osc过程对数据库的消耗更低

参考文档: https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-operations.html#online-ddl-generated-column-operations https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html#online-ddl-generated-column-operations

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

hjweddie commented 9 months ago

@hanchuanchuan 欢迎review

hanchuanchuan commented 9 months ago

感谢你的贡献!

hhyo commented 9 months ago

参考https://github.com/github/gh-ost/pull/1201 这里的实现更稳妥,压缩表和单语句混合添加字段以及索引都不支持快速加列