i did "SELECT .. FROM table WHERE cateid=1 AND ctime>xx ORDER BY ctime DESC LIMIT 10" mysql can use INDEX(cateid,ctime), with NO filesort, this is very fast, cos LIMIT is used by optimization
but now i have to query: cateid IN(1,2,3,4,5....) now mysql use filesort, which is bad, cos it get all matched result(no LIMIT) in file then sort(using LIMIT here) any workaround? btw, i cannot add more field, e.g. ccateid=1 which eq to cateid IN(1,2,3,4,5....) cos i have: cateid IN(1,2,3....) cateid IN(2,4,5) cateid IN(1,3,6) etc... just they may in any combine -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]