Answer the question
In order to leave comments, you need to log in
Slow condition in sql query?
In a table with 3 million records. The first query is very fast:
SELECT SQL_NO_CACHE `id`,`users`
FROM `table` WHERE `users` > 3000 ORDER BY `users` DESC LIMIT 0,10
SELECT SQL_NO_CACHE `id`,`users`
FROM `table` WHERE `date` IS NULL AND `users` > 3000 ORDER BY `users` DESC LIMIT 0,10
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question