高性能MYSQL读书要点摘录_1_QUERY模块
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