效能測試關注的mysql變數

來源:互聯網
上載者:User

標籤: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變數

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.