Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • So how is this answering the question? Commented Feb 13, 2015 at 18:47
  • The OP asked how to avoid using temporary and using filesort. I have explained why they are present. Commented Feb 13, 2015 at 18:50
  • thanks man it really help me to know where the problem is from ... but my column is in datetime so i have to use date() ... @Mihai propose to me to do it in my server language (java) or add a new column in type date Commented Feb 13, 2015 at 19:02
  • As @Mihai states, it all depends on how much data there will be in the table. Just because it says using temporary and using filesort does not mean that it will be slow. Commented Feb 13, 2015 at 19:24
  • it can be 100K rows ... and i try your solution to order by the same thing but i get always using temporary and using filesort Commented Feb 13, 2015 at 23:54