Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual INSERT DELAYED Syntax


The DELAYED option for the INSERT statement is a MySQL extension to standard SQL. In previous versions of MySQL, it can be used for certain kinds of tables (such as MyISAM), such that when a client uses INSERT DELAYED, it gets an okay from the server at once, and the row is queued to be inserted when the table is not in use by any other thread.

DELAYED inserts and replaces were deprecated in MySQL 5.6.6. In MySQL 5.7, DELAYED is not supported. The server recognizes but ignores the DELAYED keyword, handles the insert as a nondelayed insert, and generates an ER_WARN_LEGACY_SYNTAX_CONVERTED warning (INSERT DELAYED is no longer supported. The statement was converted to INSERT). The DELAYED keyword is scheduled for removal in a future release.

Download this Manual
User Comments
  Posted by on November 27, 2005
I found that on an empty table in an unloaded MySQL instance, insert delayed was actually about 30% slower than plain insert! Batching multiple inserts into a single 'insert values' call seems to be more effective as a speedup. Results may vary on a busy database.
  Posted by Peter Laursen on November 18, 2008
A consequence of the INSERT being executed in another thread is that LOCK TABLE tbl WRITE is not compatible with INSERT DELAYED ..., see
lock table lt2 write;
insert delayed into lt2 (t) values ('123');
-- Error Code : 1165
-- INSERT DELAYED can't be used with table 'lt2' because it is locked with LOCK TABLES
  Posted by Marcin Szalowicz on November 30, 2012
There is one thing that is missing in the docs.
INSERT DELAYED is treated as normal INSERT if a column has defined TRIGGER (AFTER or BEFORE INSERT).
I found a bug about that and some comment regarding missing doc info, about this behaviour:
Sign Up Login You must be logged in to post a comment.