MySQL

2018-09-27  本文已影响0人  FangHao

1. SQL执行顺序

FROM > ON > JOIN > WHERE > GROUP BY > HAVING > SELECT > DISTINCT > ORDER BY > LIMIT

2. SQL执行效率

EXPLAIN SELECT * from user_info WHERE id < 300;

主要查看指标 type

ALL < index < range ~ index_merge < ref < eq_ref < const < system
上一篇下一篇

猜你喜欢

热点阅读