General Thread States •  cleaning up •  closing tables •  converting HEAP to ondisk •  copy to tmp table •  Copying to group table •  Copying to tmp table •  Copying to tmp table on disk •  Creating index •  Creating sort index •  creating table •  Creating tmp table •  committing alter table to storage engine •  deleting from main table The thread has processed one command and is preparing to free memory and reset certain state variables. 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. The thread is converting an internal temporary table from a  MEMORY  table to an on-disk 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” . If a statement has different  ORDER BY  and  GROUP BY  criteria, the rows are sorted by group and copied to a temporary table. The server is copying to a temporary table in memory. 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. The thread is processing  ALTER TABLE ... ENABLE KEYS  for a  MyISAM  table. The thread is processing a  SELECT  that is resolved using an internal temporary table. The thread is creating a table. This includes creation of temporary tables. 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 . The server has finished an in-place  ALTER TABLE  and is committing the result. 1848