MySQL database key monitoring indicators

MySQL database key monitoring indicators 
QPS
queries per second, the number of queries per seconds
Show, Ltd. Free Join Status like 'Question%';
Queries / seconds The

TPS
tranaction per seconds The number of transactions per second
TPS = (Com_commit + Com_rollback) / seconds The

Show, Ltd. Free Join Status like 'Com_commit ';
Show like Global Status' Com_rollback';

thread connections
Show like Global Status' Max_used_connectons';
Show like Global Status' threads% ';

the maximum number of connections
show variable like' max_connections';

Query Cache (Cache Query)
query cache for caching query results select
the next time the same query request is received, perform the actual query processing not directly return the result
applied to a large number of queries, rarely change data in the table

to modify my.cnf
Query_cache_size to the specific size, the specific size is the actual number depends on the query, but is preferably set to a multiple of 1024,
the reference value 32M.

Add the line: query_cache_type = 0/1/2
If set to 1, all results will be cached, unless you use the select statement SQL_NO_CACHE query cache is disabled
if set to 2, only the cache by SQL_CACHE specified in the select statement needs to be cached query

query Cache command rate
Show status like 'Qcache';
Query_cache_hits = (Query_hits / (the Qcache_hits Qcache_inserts +)) * 100%

locked state
Show Global status like '%% lock';
Table_locks_waited / Table_locks_immediate lock table represents larger values result the more serious obstruction
Innodb_row_lock_waits innodb row lock, the lock gap is too large may be caused by the

master-slave delay
inquiry from the master delay time: show slave status

Guess you like

Origin www.cnblogs.com/jingzaixin/p/11423345.html