• Hi I am using wordpress 3.1.2.
    https://www.kurier.lt
    It is a big database now. It contains about 12000 posts, 45000 comments, 35000 tags and some pages. Something about 2000 visitors a day.

    Problem – is slow queries, that overloads server and makes it stop. Creates TMP tables.

    One of the queries is:

    SELECT p.* FROM wp_posts AS p INNER JOIN wp_term_relationships AS tr ON p.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'category' AND tt.term_id IN (1) WHERE p.post_date < '2014-01-23 15:05:36' AND p.post_type = 'post' AND p.post_status = 'publish' AND tt.taxonomy = 'category' ORDER BY p.post_date DESC LIMIT 1;

    How can I optimize it?

  • The topic ‘Slow query on big database’ is closed to new replies.