|
這篇文章主要介紹了MySQL性能優(yōu)化之Open_Table配置參數(shù)的合理配置建議,在MySQL數(shù)據(jù)庫中,Opened_tables表示打開過的表數(shù)量,需要的朋友可以參考下 在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情況: 復(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 | +---------------+-------+ MySQL Open_Table比較合適的值為: 復(fù)制代碼 代碼如下: Open_tables / Opened_tables * 100% >= 85% Open_tables / table_cache * 100% |
|
|