標籤:targe .com gen form this nsis 測試 索引 ber
MySQL變數很多,其中有一些MySQL變數非常值得我們注意,下面就為您介紹一些值得我們重點學習的MySQL變數,供您參考。
1 Threads_connected
首先需要注意的,想得到這個變數的值不能show variables like ‘Threads_connected‘;而是
show status like ‘Threads_connected‘(下面的變值也是這樣的);
意思:變數的值是表示當前有多少個客戶串連該mysql伺服器
引申:串連數是否過多,網路時候存在問題!特別是在pconnect的情況下:)
2 Created_tmp_disk_tables
意思:在硬碟上建立的暫存資料表數目
引申:如果這個值比較大的話,那麼查詢時需要建立暫存資料表(CREATE TEMPORARY TABLE)的操作 就要消耗更多的時間
3 Handler_read_first
意思:讀表索引的第一行
引申:如果這個值變化比較大的話,可以認為表索引建立的有問題,全索引的掃描操作比較多
4 Innodb_buffer_pool_wait_free
意思:This variable indicates the number of times MySQL has to wait for memory pages to be flus
引申:If this variable is high, it suggests that MySQL‘s memory buffer is incorrectly configured for the amount of writes the server is currently performing.
不瞭解這個:)
5 Key_reads
意思:讀檔案系統上面的索引的次數
引申:如果這個值太大的話,就需要考慮key cache設定是否正常了
6 Max_used_connections
意思:重起後到現在最大串連數
引申:伺服器負載和可能需要調節的串連數
7 Open_tables
意思:當前開啟的表的數目
引申:如果這個值很低,table cache很大,則減小table cache的設定是沒有問題的,如果這個值很大,並接近了table cache的值,我們就需要加大talbe cache的設定
8 Select_full_join
意思:全串連的查詢數目
引申:數值過大,需要建立更多的索引來避免
9 Slow_queries
意思:慢查詢的數目
引申:過大的話就要察看慢查詢的日誌,並且檢查sql語句書寫是否恰當
10 Uptime
意思:已耗用時間,單位秒
引申:This value is useful to analyze server uptime, as well as to generate reports on overall system performance. A consistent low value indicates that the server is being frequently restarted, thereby causing frequent interruptions to client service.
效能測試關注的mysql變數