MySQL Opened_tables表示打開過的表數(shù)量,下文就將教您如何合理配置MySQL Open_Table的值,希望對您學(xué)習(xí)MySQL數(shù)據(jù)庫能有所幫助。
MySQL Open_Table情況:
復(fù)制代碼 代碼如下:
mysql> show global status like 'open%tables%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Open_tables | 919 | | Opened_tables | 1951 | +---------------+-------+
MySQL Open_tables表示打開表的數(shù)量,如果MySQL Opened_tables數(shù)量過大,說明配置中table_cache(5.1.3之后這個值叫做table_open_cache)值可能太小,我們查詢一下服務(wù)器table_cache值:
復(fù)制代碼 代碼如下:
mysql> show variables like 'table_cache'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | table_cache | 2048 | +---------------+-------+