set statistics profile on

sql_statement

set statistics profile off

 

type是比较重要的,如果是ref说明是名字索引,性能从低到高依次

all<index<range<index_merge<ref_or_null_ref_eq_ref<system<const

all:全表扫描

ref:根据索引找到

https://www.bilibili.com/video/BV1JL4y1b7GW/?p=45&vd_source=07539ea0fcf778267253f9a6e6ec097d