-
explain 返回各列的含義 extra列需要注意的返回值 Using filesort:看到這個(gè)的時(shí)候,查詢就需要優(yōu)化了 Using temporary 看到這個(gè)的時(shí)候,也需要優(yōu)化,查看全部
-
mysql> explain select customer_id,first_name,last_name from customer; +----+-------------+----------+------+---------------+------+---------+------+------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+----------+------+---------------+------+---------+------+------+-------+ | 1 | SIMPLE | customer | ALL | NULL | NULL | NULL | NULL | 599 | NULL | +----+-------------+----------+------+---------------+------+---------+------+------+-------+ 1 row in set (0.00 sec)查看全部
-
+----+-------------+----------+------+---------------+------+---------+------+------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+----------+------+---------------+------+---------+------+------+-------+ | 1 | SIMPLE | customer | ALL | NULL | NULL | NULL | NULL | 599 | NULL | +----+-------------+----------+------+---------------+------+---------+------+------+-------+ 1 row in set (0.00 sec)查看全部
-
所用時(shí)間占比高,關(guān)注優(yōu)化之 掃描行數(shù)多,占用io大 掃描的行數(shù)遠(yuǎn)遠(yuǎn)大于發(fā)送的行數(shù)的話,索引優(yōu)化查看全部
-
慢查詢工具 pt-query-digest查看全部
-
日志內(nèi)容查看全部
-
show variables like '%log%';查看全部
-
show variables like 'slow_query_log'; 通過(guò)這個(gè)命令來(lái)查看慢查詢的狀態(tài)查看全部
-
查看數(shù)據(jù)庫(kù)版本,進(jìn)入數(shù)據(jù)庫(kù)控制臺(tái)后 輸入命令 select @@version;查看全部
-
通常不要超過(guò)100毫秒查看全部
-
開(kāi)啟慢查詢?nèi)罩?查看全部
-
dev.mysql.com/doc/index-other.html dev.mysql.com/doc/sakila/en/sakila-installation.html查看全部
-
數(shù)據(jù)庫(kù)優(yōu)化考慮 的幾個(gè)方面查看全部
-
mysql> select a.table_schema as '???',a.table_name as '??',a.index_name as '??1',b.index_name as '??2' -> ,a.column_name as '?????' from statistics a join statistics b on a.table_schema =b.table_schema -> and a.table_name = b.table_name and a.seq_in_index = b.seq_in_index and a.column_name = b.column_name -> where a.seq_in_index = 1 and a.index_name<>b.index_name; Empty set (0.48 sec)查看全部
-
冗余索引查看全部
舉報(bào)
0/150
提交
取消