数据库调优

SHOW PROCESSLIST;

SET profiling=1;
EXPLAIN SELECT uid FROM sns_doing GROUP BY uid ORDER BY dateline DESC  LIMIT 0,10
SHOW PROFILE FOR QUERY 13;
SHOW PROFILES;

SHOW GLOBAL STATUS;

SHOW PROCESSLIST;

SET profiling=1;
EXPLAIN SELECT uid FROM sns_doing GROUP BY uid ORDER BY dateline DESC  LIMIT 0,10
SHOW PROFILE FOR QUERY 103;
SHOW PROFILES;

SHOW GLOBAL STATUS LIKE '%prio%';
SELECT uid FROM sns_doing GROUP BY uid ORDER BY dateline DESC  LIMIT 0,10
SELECT uid FROM sns_doing GROUP BY uid ORDER BY dateline DESC  LIMIT 0,10

SHOW GLOBAL VARIABLES;
SET GLOBAL concurrent_insert=2;

你可能感兴趣的:(数据库)