I\'ve been troubleshooting this complex query today, thinking it was a performance issue. It appears that the query is getting stuck into the \'Statistics\' state. It is current
I had the same issue on a Centos server 4 cores and 180GB ram. A simple query was taking forever to run and stuck on statistics state just like what you have explained. I ran OPTIMIZE TABLE
on the tables it was querying and like 5 minutes later problem was solved. However, I never found out if it really solved the issue or not.
Just a suggestion.