1 Query Type
查询类型包含:
a full table scan , index scans, range scans, unique index lookups, and constants.
const Type: 主键查询一般为Const类型
All Type : 全表扫描
2 为啥要拆分JOIN操作
Caching can be more efficient;
Executing the queries individually can sometimes reduce lock contention;
Scale database more easily;
Reduce redundant row access;
3 Query states
MYSQL查询状态
show full processList ;
Sleep ,
Query,
Sorting result,
Sending data,
Locked,
Analyzing and statistics
4 SHOW STATUS
查看MYSQL状态信息
5 让MYSQL不走缓冲
SELECT SQL_NO_CACHE COUNT(*) FROM XXX
6 UNION
UNION是MYSQL查询 是先把SQL分开查询 放到一张临时表里 ,在返回给客户端。
7 Execution Plan
Explain extended select * from XXX;
Show Warnings; 这两句连续执行 可以显示 reconstructed query;
MYSQL查询流程图
MYSQL 客户端和服务器为half-duplex 半双工:就是只能是客户端发送请求完毕,服务器处理请求,返回数据。不存在客户端接收数据的同时在发送请求。类似推拉动作。
链接 http://my.oschina.net/robinyao/blog/530180
来源:oschina
链接:https://my.oschina.net/u/223302/blog/530180