Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I own a wordpress installation, and Updated to 3.4.1.

After the upgrade, I got a very strange slowdown to my wordpress.

After all, I used the

define('SAVEQUERIES', true);

in my wp-config.php with combined with the following code in my theme footer.php

global $wpdb;
echo "<pre>";
echo "</pre>";

and I found that while I don't have many queries (49 queries I got), there are

  • 4 Quiries took more than 9''
  • 3 Quiries took more than 8''
  • 4 Quiries took more than 7''
  • 4 Quiries took more than 6''
  • 8 Quiries took more than 5''
  • 1 Quiry took more than 4''

Here I will show you some of the queries:

/* Execution time 7.0095062E-5 */
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('category') AND tt.count > 0 ORDER BY ASC

/* Execution time 5.3167343E-5 */
SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (77375,77379,77381)

/* Execution time 9.2029572E-5 */
SELECT wp_posts.* FROM wp_posts WHERE ID IN (77381,77379,77375)

In most of the queries there query is simple, with no complexity, and I cannot imagine why that queries are so slow.

The WordPress database contains in about 60.000 records and running on percona.

Any idea for that issue and how maybe can I fix it ?

share|improve this question
How long does the query take if you run it by hand against mysql (try different IDs to avoid cached data)? Are you on any kind of shared/virtual host where something unrelated could be screwing with your IO speed? – DerfK Jul 20 '12 at 17:58
The server is dedicated with 12GB Ram installed. – Merianos Nikos Jul 21 '12 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.