Forum Moderators: coopster
query:
select .. from thread where forumid=1 and ctime>$one_month_ago order by ctime DESC
LIMIT 10
EXPLAIN gives "use index" and NO filesort, thus mysql will find by index as stop as soon as LIMIT exceed
but i now modify "forumid=1" to "forumid IN($idlist)", and EXPLAN gives "use index, filesort", which will get ALL match result from table into tmpfile, and sort as soon as LIMIT of rows is found.
btw: $idlist is not too much, but "thread"s in it is too many rows
any idea?