SELECT vt.vtid, vt.tag, vt.typeid, vt.id, vt.count, tt.type, u.username, vt.date_added, tc.context, tc.contextid
FROM (vt, tt, u)
LEFT JOIN tc ON (vt.vtid = tc.vtid AND tc.userid = vt.userid)
WHERE vt.typeid = tt.typeid
AND vt.verified =0
AND vt.userid = u.userid
ORDER BY vt.date_added DESC
LIMIT 1
需要.0007s完成慢速查詢需要.0007s?爲什麼這是在我的slowlog?
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE vt ref typeid,userid,verified verified 1 const 9 Using where; Using filesort
1 SIMPLE tt eq_ref PRIMARY PRIMARY 4 vt.typeid 1
1 SIMPLE tc ref vtid vtid 4 vt.vtid 3
1 SIMPLE u eq_ref PRIMARY PRIMARY 4 vt.userid 1 Using where
我怎樣才能改變這種在慢查詢日誌顯示不出來?
我猜測剖析器的性能標準非常高。 – BoltClock 2011-02-03 00:20:00