OK, I tried the following queries: 1. Use the ORDER BY and not the LIMIT <-- still slow 2. Use the LIMIT and not the ORDER BY <-- fast So it looks like it's building a whole temp table with all the items and then doing the ORDER BY. Just as a test, I removed the INDEX from the `salesrank` column. It didn't make a difference as my results were just like the ones above. Now that I know what's causing the slow queries, what can I do to fix it? Thanks, Grant
Hank <[EMAIL PROTECTED]> wrote: Ok, so the next step would be to try the original query with just the LIMIT clause, and then just the ORDER BY (but not both). The results of "select count(*)" query would be helpful to know just how many records mysql is trying to sort and limit. And do you really need a separte index key on `salesrank` on the product table? -Hank -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com