github / gh-ost

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

analyze table before cutover #1419

Open wangzihuacool opened 6 months ago

wangzihuacool commented 6 months ago

Related issue: #1418

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

meiji163 commented 5 months ago

LGTM

shaohk commented 5 months 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 5 months 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 ?

timvaillancourt commented 3 months 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 considering this (I didn't think of it) I suggest this is an optional flag for now and we can have opt-in users report on performance

@wangzihuacool can you add an optional flag and doc/command-line-flags.md update for this one?

Zorgon66 commented 2 months ago

👍

Is it all about me? Harun