tatacom 于 2009-02-07 16:00(15 年以前) 发表:
80W主题的论坛, 用户访问翻页占CPU很厉害, 请问有没有什么好的解决办法?
慢查询日志里很多这样的
# Query_time: 6 Lock_time: 0 Rows_sent: 38 Rows_examined: 33892
SELECT t.* FROM cdb_threads t
WHERE t.fid='58' AND t.displayorder IN (0, 1)
ORDER BY t.displayorder DESC, t.dateline DESC
LIMIT 101, 38;
# Query_time: 6 Lock_time: 0 Rows_sent: 38 Rows_examined: 51837
SELECT t.* FROM cdb_threads t
WHERE t.fid='25' AND t.displayorder IN (0, 1)
ORDER BY t.displayorder DESC, t.dateline DESC
LIMIT 25637, 38;