General Thread States •  Sorting index •  Sorting result •  starting •  statistics • System lock •  update •  Updating •  updating main table •  updating reference tables •  User lock •  User sleep 1852 The thread has invoked a  SLEEP()  call. The thread is going to request or is waiting for an advisory lock requested with a  GET_LOCK()  call. For SHOW PROFILE , this state means the thread is requesting the lock (not waiting for it). The server is executing the second part of a multiple-table update and updating the matched rows from the other tables. The server is executing the first part of a multiple-table update. It is updating only the first table, and saving columns and offsets to be used for updating the other (reference) tables. The thread is searching for rows to update and is updating them. The thread is getting ready to start updating the table. For system tables, the  Locking system tables  state is used instead. For example, the thread is going to request or is waiting for an internal or external system lock for the table. This can occur when  InnoDB  waits for a table-level lock during execution of  LOCK TABLES . If this state is being caused by requests for external locks and you are not using multiple  mysqld  servers that are accessing the same  MyISAM  tables, you can disable external system locks with the  --skip- external-locking  option. However, external locking is disabled by default, so it is likely that this option has no effect. For  SHOW PROFILE , this state means the thread is requesting the lock (not waiting for it). The thread has called  mysql_lock_tables()  and the thread state has not been updated since. This is a very general state that can occur for many reasons. The server is calculating statistics to develop a query execution plan. If a thread is in this state for a long time, the server is probably disk-bound performing other work. For a  SELECT  statement, this is similar to  Creating sort index , but for nontemporary tables. The first stage at the beginning of statement execution. The thread is sorting index pages for more efficient access during a  MyISAM  table optimization operation.