> Creating a combined index can help MySQL in using this index for both the > where condition and the order by clause. > Try the query with an index on cat,date and with date,cat; maybe one will be > faster than the other.
This partially solved my problem. Thanks a lot. However I am facing a new problem here. The query where I am ordering by a column is much more slowly than the same query NOT using SQL_CALC_FOUND_ROWS select SQL_CALC_FOUND_ROWS * from table by date desc - this query takes about 1.2 s select * from table by date desc - this query takes about 0.1 s Using explain I have noticed that the first query is using filesort and I cannot figure out why exactly... I could use count() to figure out the total number of results for the navigation and this would be defintelly much faster since now as I have tested but I was thinking if anyone else had this problem before and if you have found any work around... After some checkings In have discovered that this is more or less a bug http://bugs.mysql.com/bug.php?id=1274 But after checking very ddpe here and trying all possibilities I think this is a little different... Let me know if anyone wants to see the table structure... Thanks, Arthur -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]