As of MySQL 3.23.7 (3.23.25 for Windows), the
MyISAM storage engine supports concurrent
inserts to reduce contention between readers and writers for a
given table: If a MyISAM table has no holes
in the data file (deleted rows in the middle), inserts can be
performed to add rows to the end of the table at the same time
that SELECT statements are reading rows from
the table. Concurrent inserts are enabled by default, but can be
disabled by setting the concurrent_insert
system variable to 0.
Under circumstances where concurrent inserts can be used, there
is seldom any need to use the DELAYED
modifier for INSERT statements. See
Section 13.2.4.2, “INSERT DELAYED Syntax”.
If you are using the update log or binary log, concurrent
inserts are converted to normal inserts for CREATE ...
SELECT or INSERT ... SELECT
statements. This is done to ensure that you can re-create an
exact copy of your tables by applying the log during a backup
operation. See Section 5.11.4, “The Binary Log”.
With LOAD DATA INFILE, if you specify
CONCURRENT with a MyISAM
table that satisfies the condition for concurrent inserts (that
is, it contains no free blocks in the middle), other threads can
retrieve data from the table while LOAD DATA
is executing. Use of the CONCURRENT option
affects the performance of LOAD DATA a bit,
even if no other thread is using the table at the same time.
If you specify HIGH_PRIORITY, it overrides
the effect of the --low-priority-updates option
if the server was started with that option. It also causes
concurrent inserts not to be used.
For LOCK TABLE, the difference between
READ LOCAL and READ is
that READ LOCAL allows non-conflicting
INSERT statements (concurrent inserts) to
execute while the lock is held. However, this cannot be used if
you are going to manipulate the database using processes
external to the server while you hold the lock.

User Comments
Add your own comment.