# Delayed Insert Connection Thread States

This article documents thread states that are related to the connection thread that processes [INSERT DELAYED](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data/insert-delayed) statements.

These correspond to the `STATE` values listed by the [SHOW PROCESSLIST](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-processlist) statement or in the [Information Schema PROCESSLIST Table](https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-processlist-table) as well as the `PROCESSLIST_STATE` value listed in the [Performance Schema threads Table](https://mariadb.com/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-threads-table).

| Value                      | Description                                                                                                                                                      |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| allocating local table     | Preparing to allocate rows to the delayed-insert handler thread. Follows from the got handler lock state.                                                        |
| Creating delayed handler   | Creating a handler for the delayed-inserts.                                                                                                                      |
| got handler lock           | Lock to access the delayed-insert handler thread has been received. Follows from the waiting for handler lock state and before the allocating local table state. |
| got old table              | The initialization phase is over. Follows from the waiting for handler open state.                                                                               |
| storing row into queue     | Adding new row to the list of rows to be inserted by the delayed-insert handler thread.                                                                          |
| waiting for delay\_list    | Initializing (trying to find the delayed-insert handler thread).                                                                                                 |
| waiting for handler insert | Waiting for new inserts, as all inserts have been processed.                                                                                                     |
| waiting for handler lock   | Waiting for delayed insert-handler lock to access the delayed-insert handler thread.                                                                             |
| waiting for handler open   | Waiting for the delayed-insert handler thread to initialize. Follows from the Creating delayed handler state and before the got old table state.                 |

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/buffers-caches-and-threads/thread-states/delayed-insert-connection-thread-states.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
