mysql 索引 KEY与INDEX的区别: KEY is something on the logical level, describes your table and database design.INDEX is something on the physical level, helps improve access time for table operations. KEY是关系模型理论中的一部份,比如有主键(Primary Key),外键(Foreign Key)等,用于数据完…
4.type这列很重要,显示了连接使用了哪种类别,有无使用索引.从最好到最差的连接类型为const.eq_reg.ref.range.indexhe和ALL (1).system这是const联接类型的一个特例.表仅有一行满足条件.如下(t3表上的id是 primary key)mysql> explain select * from (select * from t3 where id=3952602) a ;+----+-------------+------------+--------+…
所使用的mysql函数explain语法:explain < table_name >例如: explain select * from t3 where id=3952602;explain输出结果+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+| id | select_type | table | type | possible_keys…