The dictionary object cache is a shared global cache that stores previously accessed data dictionary objects in memory to enable object reuse and minimize disk I/O. 字典对象缓存是一种共享全局缓存,它将以前访问的数据字典对象存储在内存中,以实现对象重用并最小化磁盘I/O。Similar to other cache mechanisms used by MySQL, the dictionary object cache uses an LRU-based eviction strategy to evict least recently used objects from memory.与MySQL使用的其他缓存机制类似,字典对象缓存使用基于a class="link" href="glossary.html#glos_lru">LRU的逐出策略从内存中逐出最近使用最少的对象。
The dictionary object cache comprises cache partitions that store different object types. 字典对象缓存包含存储不同对象类型的缓存分区。Some cache partition size limits are configurable, whereas others are hardcoded.一些缓存分区大小限制是可配置的,而另一些是硬编码的。
tablespace definition cache partition表空间定义缓存分区: Stores tablespace definition objects. :存储表空间定义对象。The tablespace_definition_cache
option sets a limit for the number of tablespace definition objects that can be stored in the dictionary object cache. The default value is 256.
schema definition cache partition模式定义缓存分区: Stores schema definition objects. :存储架构定义对象。The schema_definition_cache
option sets a limit for the number of schema definition objects that can be stored in the dictionary object cache. The default value is 256.
table definition cache partition表定义缓存分区: Stores table definition objects. :存储表定义对象。The object limit is set to the value of max_connections
, which has a default value of 151.
The table definition cache partition exists in parallel with the table definition cache that is configured using the 表定义缓存分区与使用table_definition_cache
configuration option. table_definition_cache
配置选项配置的表定义缓存并行存在。Both caches store table definitions but serve different parts of the MySQL server. 两个缓存都存储表定义,但服务于MySQL服务器的不同部分。Objects in one cache have no dependence on the existence of objects in the other.一个缓存中的对象不依赖于另一个缓存中对象的存在。
stored program definition cache partition存储程序定义缓存分区: Stores stored program definition objects. :存储存储的程序定义对象。The stored_program_definition_cache
option sets a limit for the number of stored program definition objects that can be stored in the dictionary object cache. The default value is 256.
The stored program definition cache partition exists in parallel with the stored procedure and stored function caches that are configured using the 存储程序定义缓存分区与使用stored_program_cache
option.stored_program_cache
选项配置的存储过程和存储函数缓存并行存在。
The stored_program_cache
option sets a soft upper limit for the number of cached stored procedures or functions per connection, and the limit is checked each time a connection executes a stored procedure or function. stored_program_cache
选项为每个连接的缓存存储过程或函数的数量设置软上限,并且每次连接执行存储过程或函数时都会检查该限制。The stored program definition cache partition, on the other hand, is a shared cache that stores stored program definition objects for other purposes. 另一方面,存储程序定义缓存分区是一个共享缓存,用于存储用于其他目的的存储程序定义对象。The existence of objects in the stored program definition cache partition has no dependence on the existence of objects in the stored procedure cache or stored function cache, and vice versa.存储程序定义缓存分区中对象的存在与存储过程缓存或存储函数缓存中对象的存在无关,反之亦然。
character set definition cache partition字符集定义缓存分区: Stores character set definition objects and has a hardcoded object limit of 256.:存储字符集定义对象,硬编码对象限制为256。
collation definition cache partition排序规则定义缓存分区: Stores collation definition objects and has a hardcoded object limit of 256.:存储排序规则定义对象,硬编码对象限制为256。
For information about valid values for dictionary object cache configuration options, refer to Section 5.1.8, “Server System Variables”.有关字典对象缓存配置选项有效值的信息,请参阅第5.1.8节,“服务器系统变量”。