## • cleaning up 

The thread has processed one command and is preparing to free memory and reset certain state variables. 

## • closing tables 

The thread is flushing the changed table data to disk and closing the used tables. This should be a fast operation. If not, verify that you do not have a full disk and that the disk is not in very heavy use. 

## • converting HEAP to ondisk 

The thread is converting an internal temporary table from a MEMORY  table to an on-disk table. 

## • copy to tmp table 

The thread is processing an ALTER TABLE  statement. This state occurs after the table with the new structure has been created but before rows are copied into it. 

For a thread in this state, the Performance Schema can be used to obtain about the progress of the copy operation. See Section 27.12.5, “Performance Schema Stage Event Tables” . 

## • Copying to group table 

If a statement has different ORDER BY  and GROUP BY  criteria, the rows are sorted by group and copied to a temporary table. 

## • Copying to tmp table 

The server is copying to a temporary table in memory. 

## • Copying to tmp table on disk 

The server is copying to a temporary table on disk. The temporary result set has become too large (see Section 8.4.4, “Internal Temporary Table Use in MySQL” ). Consequently, the thread is changing the temporary table from in-memory to disk-based format to save memory. 

## • Creating index 

The thread is processing ALTER TABLE ... ENABLE KEYS  for a MyISAM  table. 

## • Creating sort index 

The thread is processing a SELECT  that is resolved using an internal temporary table. 

## • creating table 

The thread is creating a table. This includes creation of temporary tables. 

## • Creating tmp table 

The thread is creating a temporary table in memory or on disk. If the table is created in memory but later is converted to an on-disk table, the state during that operation is Copying to tmp table on disk . 

## • committing alter table to storage engine 

The server has finished an in-place ALTER TABLE  and is committing the result. 

## • deleting from main table 

