hanchuanchuan / goInception

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

优化在线改表的使用时机 #590

Closed hjweddie closed 1 year ago

hjweddie commented 1 year ago

描述您想要的功能: MySQL已有原生支持Online DDL。 希望能判断SQL是否能符合 Only Modifies Metadata, 符合的话,直接提交到MySQL执行。

现实中可能有数据量较大的表,需要删除其中一个索引的时候,走pt-osc等在线改表工具,会重建整张大表,时间和性能消耗较大,这消耗也不必要。如果直接提交MySQL的话,能接近马上完成,对数据库的消耗会低非常多

描述您考虑过的解决/替代方案:

可参考文档,资料,引用等: https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html

kimiliang123 commented 1 year ago

https://github.com/hanchuanchuan/goInception/issues/258 参考这个呗,可以自己设置的

hjweddie commented 1 year ago

hjweddie commented 1 year ago

这个issue看起来可以关了