Question: For example, I issued an ALTER TABLE statement to create an index on a MEDIUMTEXT field in an InnoDB table that has 134k rows where the size of the index was 255 bytes and the average size of the data in the field is 30k. This command has been running for the last 15 minutes or so (and is the only thing running on the database). Is there any way for me to determine if it is going to finish in closer to 5 minutes, 5 hours, or 5 days?

Answer: 
In the case of InnoDB tables, one can use [`SHOW ENGINE INNODB STATUS`](http://dev.mysql.com/doc/refman/5.0/en/show-engine.html) to find the transaction doing the ALTER TABLE and check how many row locks the TX holds. This is the number of processed rows. Explained in detail here:

<http://gabrielcain.com/blog/2009/08/05/mysql-alter-table-and-how-to-observe-progress/>

Also MariaDB 5.3 and later has the feature to report progress for some operations (including ALTER TABLE). See:

<http://kb.askmonty.org/en/progress-reporting/>
Very old question but at leas mysql 5.7 has a proper answer for this

<https://dev.mysql.com/doc/refman/5.7/en/monitor-alter-table-performance-schema.html>

In essence...

```
UPDATE performance_schema.setup_instruments
       SET ENABLED = 'YES'
       WHERE NAME LIKE 'stage/innodb/alter%';
UPDATE performance_schema.setup_consumers
       SET ENABLED = 'YES'
       WHERE NAME LIKE '%stages%';

```

... run the alter table ...

```
SELECT EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
       FROM performance_schema.events_stages_current;
+------------------------------------------------------+----------------+----------------+
| EVENT_NAME                                           | WORK_COMPLETED | WORK_ESTIMATED |
+------------------------------------------------------+----------------+----------------+
| stage/innodb/alter table (read PK and internal sort) |            280 |           1245 |
+------------------------------------------------------+----------------+----------------+
1 row in set (0.01 sec)

```