![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
Apllo_boy
聚水成滴,积木成林。
展开
-
mysql 执行计划分析
MYSQL 执行计划(explain详解)使用explain后给出的相关索引信息下面是一个select语句的使用explain之后的例子:idselect查询的序列号select_typea.SIMPLE:查询中不包含子查询或者UNIONb.PRIMARY:查询中若包含任何复杂的子部分,最外层查询的标记c.SUBQUERY:在SELECT或WHERE列表中包含了...转载 2018-12-27 10:58:25 · 278 阅读 · 0 评论 -
order by 优化
前言:在使用order by时,经常出现Using filesort,因此对于此类sql语句需尽力优化,使其尽量使用Using index。0.准备#1.创建test表。drop table if exists test;create table test(id int primary key auto_increment,c1 varchar(10),c2 varchar(...转载 2018-12-25 21:38:32 · 211 阅读 · 0 评论