github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.11k stars 1.23k forks source link

analyze table before cutover #1419

Open wangzihuacool opened 1 month ago

wangzihuacool commented 1 month ago

Related issue: #1418

Description: analyze ghost table before cutover to avoid table statistics not timely updated.

meiji163 commented 1 month ago

LGTM

shaohk commented 1 month ago

When the modified table is a partition table, the execution time of the ANALYZE command will increase as the number of partitions increases. When the ANALYZE statement is synchronized to the replica, it may cause replication lag.

meiji163 commented 1 month ago

When the ANALYZE statement is synchronized to the replica, it may cause replication lag.

Maybe make this feature a optional flag then? What do you think @timvaillancourt ?