I’m running an ALTER TABLE operation to add an index on a TEXT column in my InnoDB table. The table contains around 150k records and each row has roughly 25k of data in that column. The index size is set to 200 bytes.
This operation has been executing for about 20 minutes now and it’s the only active process on my database server. I really need to know if this will complete in minutes, hours, or potentially days.
Does MySQL provide any built-in tools or commands to check the current status of long-running ALTER TABLE operations? I want to estimate how much longer I need to wait before the indexing process finishes.
check performance_schema.events_stages_current if you have it on. it gives a bit of info on the DDL progress, though not super precise. also, keep an eye on the error log, you might spot some strange warnings while ALTER is running.
MySQL does not provide specific progress updates for ALTER TABLE commands, which can be frustrating. However, you can monitor the status of the operation by using SHOW PROCESSLIST
. While this command won’t indicate the remaining time, it allows you to confirm that the query is still actively running. Additionally, tools like htop or iostat can help you track disk I/O to assess if there is ongoing activity. For future operations, consider using pt-online-schema-change from the Percona Toolkit, as it offers progress information and avoids table locks.