MySQL Open_Table的合理配置
作者:佚名
在MySQL數(shù)據(jù)庫中,Opened_tables表示打開過的表數(shù)量,下面將對MySQL Open_Table的合理配置作詳細(xì)的說明介紹,供您參考。
MySQL Opened_tables表示打開過的表數(shù)量,下文就將教您如何合理配置MySQL Open_Table的值,希望對您學(xué)習(xí)MySQL數(shù)據(jù)庫能有所幫助。
MySQL Open_Table情況:
- 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值:
- mysql> show variables like 'table_cache';
- +---------------+-------+
- | Variable_name | Value |
- +---------------+-------+
- | table_cache | 2048 |
- +---------------+-------+
MySQL Open_Table比較合適的值為:
- Open_tables / Opened_tables * 100% >= 85%
- Open_tables / table_cache * 100%
【編輯推薦】
責(zé)任編輯:段燃
來源:
互聯(lián)網(wǎng)