係統效能相關的MySQL變數

日期:2008-07-09  作者:喜騰小二  來源:PHPChina


係統效能相關的MySQL變數

原文摘錄自:http://forge.mysql.com/wiki/ServerVariables

Memory-Related Variables
記憶體相關變數

These server variables control the amount of memory allocated to the various buffers and caches within MySQL.
以下這些伺服器變數控制這MySQL分配給各種緩衝或者換快取的記憶體總數。

join_buffer_size
(PER SESSION) Controls the amount of memory allocated to perform joins on tables that have no keys which can be used to perform a condition filter. Allocated for each table joined without necessary filter conditions
(工作階段變數) 控制在對沒有索引的表連線時分配的記憶體總數,它可以用做條件篩選器。為連線中的每個表分配而無需必要的篩選條件。

key_buffer_size
(GLOBAL) (MyISAM-only) Controls the amount of memory allocated to the MyISAM index key cache
(全域變數) (隻針對MyISAM表) 空置分配給MyISAM索引快取的記憶體總數。

innodb_buffer_pool_size
(GLOBAL) (InnoDB-only) Controls the amount of memory allocated to the InnoDB cache containing both clustered data and secondary index pages
(全域變數) (隻針對Innodb) 控制分配給包括叢集資料以及次要索引頁的Innodb快取的記憶體總數。

innodb_additional_mem_pool_size
(GLOBAL) (InnoDB-only) Controls the amount of memory allocated to the buffer storing the InnoDB internal data dictionary
(全域變數) (隻針對Innodb) 控制分配給對Innodb內部資料字典進行排序所需的緩衝。

innodb_log_buffer_size
(GLOBAL) (InnoDB-only) Controls the amount of memory allocated to the buffer storing InnoDB write-ahead log entries
(全域變數) (隻針對Innodb) 控制分配給對Innodb存儲提前寫日誌記錄所需的緩衝。

query_cache_size
(GLOBAL) Controls the amount of memory allocated to the Query Cache
(全域變數) 控制分配給查詢快取的記憶體總量。

read_buffer_size
(PER SESSION) Controls the amount of memory allocated to the connecting thread in order to process a table scan
(工作階段變數) 控制分配給處理掃瞄表的連線執行緒記憶體總數。

read_rnd_buffer_size
(PER SESSION) Controls the amount of memory allocated to the buffer used to read previously sorted results
(工作階段變數) 控制分配給讀取當前排序完的結果所需的緩衝總數。

sort_buffer_size
(PER SESSION) Controls the amount memory allocated to the buffer used to sort result sets before returning the set to the calling client
(工作階段變數) 控制在把結果返回給調用的用戶端之前需要對結果集進行排序所需的緩衝總數。

thread_stack
(PER SESSION) Controls the default stack memory allocated for each connecting thread
(工作階段變數) 控制分配給每個連線執行緒的預設堆棧記憶體總數。

tmp_table_size
(GLOBAL) Controls the maximum memory to allocate to a temporary table before MySQL converts it into an on-disk MyISAM table
(全域變數) 控制MySQL在把一個暫時表轉換成磁碟存儲的MyISAM表時所需的最大記憶體總數。

Thread-Related Variables
執行緒相關變數

thread_cache_size
(GLOBAL) Determines the number of thread connection objects that MySQL keeps in a cache to mitigate resource creation costs
(全域變數) 確定MySQL在快取中保持的連線執行緒數量,這能減少建立連線時所需的係統資源。

<<<返回技術中心

技術文章

站內新聞