• I have the latest version of wordpress on GamingAngels.com. But my host started complaining about two months ago that our site is having spiking cpu. Basically we have to solve the problem or move the site. Which will basically leave me with the same problem.

    We are a small site, but we have 12,058 posts.

    We found alot of weird queries in a mysql dump

    It seems to be going through and selecting every post and taxonomies. Anyone know how to fix this?

    Thank you,
    Trina

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,
    I checked your site and yes, it’s slow, have you modified the theme? have you changed the query of the posts?are you sure the theme is up to date also?
    What theme are you using?
    12k posts are not so many, the drag is from the query not from the number of posts, also using phpmyadmin you can optimize your tables and make sure you don’t have any issues with them.

    Thread Starter trinasc

    (@trinasc)

    Hi! I did update it from Stars theme (which was a categories layout) to Maverick (a single blog layout) https://themeforest.net/item/maverick-blogmagazine-wordpress-theme/592367

    I did run an optimization and got rid of revisions from past posts.

    Thank you for your comments! I’d love further help!

    I assume you haven’t modified the query of the posts. you have the sql dump, can you check what function from your site is making the query that slows down the site? you said that it seems to be going through and selecting all the posts and taxonomies, can you check when this happens? when displaying the index.php page? or when you make a search?
    This looks to be bad code so it can be ether from an plugin -like a search plugin or a category/posts display plugin or it can be from the new theme the best way to check this would be to locate the function that generates the issues and check it’s code to see if it has an incorrect query.

    Thread Starter trinasc

    (@trinasc)

    I can read sql pretty well, but this is so jumbled. Here is a sample of it:
    ‘SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND ( wp_posts.ID NOT IN (\n SELECT object_id\n FROM wp_term_relationships\n WHERE term_taxonomy_id IN (5,3581,12054)\n ) ) AND wp_posts.post_type = \’post\’ AND (wp_posts.post_status = \’publish\’) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10′),(‘2012-05-01 23:54:40′,(server stuff),’SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (5) ) AND wp_posts.post_type = \’post\’ AND (wp_posts.post_status = \’publish\’) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 6′),(‘2012-05-01 23:54:56’,(I think server stuff) ‘SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (5) ) AND wp_posts.post_type = \’post\’ AND (wp_posts.post_status = \’publish\’) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 6′),

    it’s like inner joins upon inner joins…

    Thread Starter trinasc

    (@trinasc)

    Going to bed but will check in tomorrow. Thanks for the help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Assistance with SQL_CALC_FOUND_ROWS Bug’ is closed to new replies.