Mysql

WordPress Performance Hog

While testing WordPress for a news aggregation project I noticed that the slow-query log of MYSQL grew and grew…

well… no wonder… brrr… temporay segments, and filesorts go to disk

</p>

	<p>explain <span class="caps">SELECT</span> cat_ID, cat_name, category_nicename, category_description,</p>

                <acronym title="wp_post2cat.post_id">COUNT</acronym> <span class="caps">AS</span> cat_count

                <span class="caps">FROM</span> wp_categories

                <span class="caps"><span class="caps">INNER</span> JOIN</span> wp_post2cat <span class="caps">ON </span>(cat_ID = category_id)

                <span class="caps"><span class="caps">INNER</span> JOIN</span> wp_posts <span class="caps">ON </span>(ID = post_id)

                <span class="caps">WHERE</span> post_status = 'publish'

                <span class="caps">AND</span> post_date_gmt < '2005-04-29 09:36:53'

                <span class="caps"><span class="caps">GROUP</span> BY</span> category_id;

	<p>

>

table type possible_keys key key_len ref rows Extra
wp_posts index PRIMARY,post_status,post_date_filter post_date_filter 17 (NULL) 11946 Using where; Using index; Using temporary; Using filesort
wp_post2cat ref post_id post_id 8 wp_posts.ID 1 Using where; Using index
wp_categories eq_ref PRIMARY PRIMARY 8 wp_post2cat.category_id 1  

I will update this post when I got a solution.

06/05/22:

  • sorry for the broken layout above… need to recheck the template design issues here when I do a migration to wordpress or drupal

  • I posted some experiences, updates on Wordpress Performance tuning and will post about wordpress 2 performance these days…

    Average rating
    (0 votes)
  • Similar entries