mysql执行计划可用于分析mysqlsql语句的执行流程。这个sql语句是怎么找到结果的---
使用navicat for mysql 工具来分析
--------------------------------------------------------
表结构如下,等下就查询english这行
-------------------------------------------------------------------------------------
先进性一次普通的查询
------------------------------------------------------------------------------------------------------------------
在该查询语句上进程sql执行计划---- explain sql语句
explain的大概解释
table - 查询的表
type ---连接类型 (重点)
possible_keys --- 可能应用的索引
key ---- 实际使用的缩影
key_len --索引的长度
ref ---索引的那一列被使用
rows -- 查询的行数
------------------------------------------------------------------------------
我们给这个表的count字段加个索引
CREATE index index_count on book(count);
------------------------------------------------------------------------------------
在有索引的条件下,再看看sql的执行计划