MySQL查看索引是否有效
EXPLAIN
SELECT
wtt.uuid,wtt.i,wtt.s,wtt.ua,wtt.aid,wtt.uid,wtt.`from`,wtt.gsid,rand
FROM web_target_t wtt
WHERE wtt.is_vip = 0 AND wtt.is_blue = 0 AND wtt.is_star = 0 AND invalid_state=0
AND wtt.urank>=10
AND wtt.urank>20
AND wtt.rand<100000
ORDER BY `rand` limit 10;
type range
possible_keys rand,idx_distribute
rows 254

浙公网安备 33010602011771号