Fix for Slow Wordpress query SELECT SQL_CALC_FOUND_ROWS wp_posts
Word press sites may become too slow causing even the server to go down.
The issue will be with Mysql Slow queries and if you can connect to mysql and run the query "show processlist;" you will get queries like the below running for few minutes.
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1
The fix can be found at
Find the path version related to your wordpress version. The fix is in the file wp-includes/query.php
You will have to make quite a few changes. Remove the unwanted lines and add the new lines in a precise way. I dint know if there is a better way to install the changes from the path file and I just made the respective changes mysql.
And that worked for us.