MySQL Variables metadata_locks_hash_instances 数据库 参数变量解释及正确配置使用
本站中文解释
MySQL参数变量metadata_locks_hash_instances指的是MySQL使用的元数据操作锁的散列实例的数量。这个参数的默认值是8,但是它可以通过调整服务器启动参数来改变。Metadata locks,它保证发送给MySQL的不同事务的操作之间的全局子算法独立性,它的实现是用一个独立的数据库操作的锁来解决多并发的冲突。如果metadata_locks_hash_instances参数被更改,必须重新启动MySQL服务器,以使对该参数所做的更改生效。
官方英文解释
metadata_locks_hash_instances
Command-Line Format | --metadata-locks-hash-instances=# |
---|---|
Deprecated | Yes |
System Variable | metadata_locks_hash_instances |
Scope | Global |
Dynamic | No |
Type | Integer |
Default Value | 8 |
Minimum Value | 1 |
Maximum Value | 1024 |
The set of metadata locks can be partitioned into separate
hashes to permit connections accessing different objects to
use different locking hashes and reduce contention. The
metadata_locks_hash_instances
system variable specifies the number of hashes (default 8).
In MySQL 5.7.4, metadata locking implementation changes make
this variable unnecessary, and so it is deprecated; expect it
to be removed in a future release of MySQL.