• Hi,
    I’ve done a 2.0 fresh install and manually imported from a custom CMS nearly 15000 posts (from 2002 to 2006) but now my WP is going too slow as in the topic title.
    The slow queries (seen thanks to Jerome’s Query Diagnostics) are the one that look at wp_posts especially (from the main page) the ugly
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2006-01-20 21:51:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 30 (nearly 15 secs)
    SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM wp_posts WHERE post_date < '2006-01-20 22:52:08' AND post_date != '0000-00-00 00:00:00' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC (nearly 8 secs but it is executed 2 times! wtf?)
    and
    SELECT COUNT(DISTINCT ID) FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2006-01-20 21:51:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND post_status != "attachment" (nearly 6 seconds)

    Some idea?

    Thank you,
    Paolo

  • The topic ‘10 queries, 42.297 seconds’ is closed to new replies.