欢迎光临
我们一直在努力

MySQL Variables concurrent_insert 数据库 参数变量解释及正确配置使用

本站中文解释

concurrent_insert是MySQL服务器的一个参数变量,它指示MySQL在执行INSERTS语句时是否允许并发插入行。它允许多个客户端在同一张表中同时向数据库插入行。角色默认值是2,它可以用以下语句进行设置:

SET GLOBAL concurrent_insert = mode_value;

mode_value可以是以下值之一:

1:不允许concurrent_insert
2: 允许当前INSERT语句继续,但不允许其它INSERT语句。
0: 允许并发插入行。

一旦改变,这个变量的更改是永久的,直到服务器重新启动。

官方英文解释

concurrent_insert

Command-Line Format --concurrent-insert[=value]
System Variable concurrent_insert
Scope Global
Dynamic Yes
Type Enumeration
Default Value AUTO
Valid Values

NEVER

AUTO

ALWAYS

0

1

2

If AUTO (the default), MySQL permits
INSERT and
SELECT statements to run
concurrently for MyISAM tables that have no
free blocks in the middle of the data file.

This variable can take the values shown in the following
table. The variable can be assigned using either the name
values or corresponding integer values.

Value Description
NEVER (or 0) Disables concurrent inserts
AUTO (or 1) (Default) Enables concurrent insert for MyISAM tables
that do not have holes
ALWAYS (or 2) Enables concurrent inserts for all MyISAM tables,
even those that have holes. For a table with a hole, new
rows are inserted at the end of the table if it is in
use by another thread. Otherwise, MySQL acquires a
normal write lock and inserts the row into the hole.

If you start mysqld with
--skip-new,
concurrent_insert is set to
NEVER.

See also Section 8.11.3, “Concurrent Inserts”.

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。