MySQLで重いALTER TABLEの実行中に進捗状況を確認する方法
事前に設定を有効化する必要あり
code:sql
mysql> SELECT EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED FROM performance_schema.events_stages_current;
+-----------------------------+----------------+----------------+
| EVENT_NAME | WORK_COMPLETED | WORK_ESTIMATED |
+-----------------------------+----------------+----------------+
| stage/sql/copy to tmp table | 55613 | 254513 |
+-----------------------------+----------------+----------------+
1 row in set (0.00 sec)