0
![Stack Overflow](http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png)
Use profile to check the cost time in each step;
set profiling=1;
Run you query;
Check the query:show profiles;
List the time cost: show profile block io,cpu for query N;
Find the step which has the high Duration
It shows like this
Possible problem: Index, Order by, File sort, Use temp ta...