MySQL stores active table descriptors in a special memory buffer
called the table open cache. This buffer is controlled by
configuration variables table_open_cache
that hold
the maximum number of table descriptors that MySQL should store
in the cache, and table_open_cache_instances
that
stores the number of the table cache instances. With default
values of table_open_cache=4000
and
table_open_cache_instances=16
, MySQL will create 16
independent memory buffers that will store 250 table descriptors
each. These table cache instances could be accessed concurrently,
allowing DML to use cached table descriptors without locking each
other.
If you use only tables, the table cache does not require a lot of
memory because descriptors are lightweight, and even if you
significantly increase the value of the
table_open_cache
, the required memory amount would
not be so high. For example, …