SELECT Aa.* , B.col, B.col, C.col, C.col FROM (SELECT A.col, A.col, A.col, A.col , A.col, A.col, A.col, A.col, A.col, A.col, A.col , A.col FROM A WHERE A.class1id = 1000000 AND 1 ORDER BY A.oktime DESC LIMIT 286660,20) Aa LEFT JOIN B ON Aa.class2id=B.id LEFT JOIN C ON Aa.username=C.username
SELECT Aa.* , B.col, B.col, C.col, C.col FROM (SELECT A.col, A.col, A.col, A.col , A.col, A.col, A.col, A.col, A.col, A.col, A.col , A.col FROM A INNER JOIN (SELECT askid FROM solve_answerinfo use INDEX (idx_1) WHERE class1id = 1000000 ORDER BY oktime DESC LIMIT 389300,20) aaa USING (askid)) Aa LEFT B ON Aa.class2id=B.id LEFT JOIN C ON Aa.username=C.username;
create index idx_1 on solve_answerinfo (oktime,askid,class1id);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。