I've got a wordpress website ready to go that's reasonably popular but during the last day or two my performance has degraded terribly.

I've installed Jet Profiler and also have been monitoring the MySQL database to ascertain if I'm able to find a problem and that one totally consistently the worst offender.

SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER BY wp_posts.ID ASC LIMIT 0, 1

My first guess is always to take away the SQL_CALC_FOUND_ROWS function and alter the * to be precise fields only however i aren't able to find what's calling this question.

Wouldso would I discover which php file is asking this?

You might like to have a look at both of these issues published on their own tracker:



(Update: Added a hyperlink)

There's a high probability that's your top of the page. I suppose you've installed caching before WordPress, either using WP Super Cache or something like that else (nginx, Squid, etc). Otherwise, you should not be searching in the database. Caching is critical for WP.