status = show status like ‘%%' [例:show status like 'Com_select']
variables = show variables like ‘%%' [例:show variables like 'query_cache_size']
1、MySQL查詢次數(status)
Com_select;Com_update;Com_insert;Com_delete;Com_change_db
2、查詢快取空間大小:query_cache_size(variables)
查詢快取最大查詢資料集大小:query_cache_limit(variables);
緩衝中的查詢個數:Qcache_inserts(status);
查詢快取命中率:(Qcache_hits/(Qcache_hits+Qcache_inserts))*100% (status)
3、索引快取命中率
索引緩衝空間大小:key_buffer_size (variables)
索引快取命中率:(Key_reads/Key_read_requests)*100% (status)
4、並發串連數
最大充許串連數:max_connections(variables)
實際最大串連數:max_used_connections(status)
當前串連數:Threads_connected(status)
活躍串連數:Threads_running(status)
緩衝串連數:Threads_cache(status)
5、流量統計(status)
Bytes_received ,Bytes_sent(status)
6、串連次數
每秒串連次數:Connections(status)
每秒實際建立串連次數:Threads_created(status)
7、表鎖定統計
立即釋放的表鎖數:Table_locks_immediate(status)
需要等待的表鎖數:Table_locks_waited(status)