WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Yet Another Related Posts Plugin] 3 million queries that crashes my DB!!!! (2 posts)

  1. Galerio
    Member
    Posted 5 years ago #

    I have installed versione 3 and next updates, but it keeps on crashing my database when I add a new post!!!

    Here is my DB log:

    # User@Host: ****** @ srv-hp3.netsons.net [10.1.1.3]
    # Query_time: 15.309911  Lock_time: 0.000199 Rows_sent: 0  Rows_examined: 3788413
    SET timestamp=1242471284;
    insert into wp_yarpp_related_cache (reference_ID,ID,score) SELECT 2182, ID, (0+ (MATCH (post_content) AGAINST ('kaspersky protection security 2010 ndash internet product systems technologies types free labs
    designed personal hacker based products home spam pc ')) * 1+ (MATCH (post_title) AGAINST ('2010 392 beta security internet anti virus kaspersky ')) * 1+ COUNT( DISTINCT tagtax.term_taxonomy_id ) * 1+ COUNT(
     DISTINCT cattax.term_taxonomy_id ) * 1) as score
     from wp_posts
     left JOIN wp_term_relationships AS thistag ON (thistag.object_id = 2182 )
                    left JOIN wp_term_relationships AS tagrel on (tagrel.term_taxonomy_id = thistag.term_taxonomy_i d
                    AND tagrel.object_id = wp_posts.ID)
                    left JOIN wp_term_taxonomy AS tagtax ON ( tagrel.term_taxonomy_id = tagtax.term_taxonomy_id
                    AND tagtax.taxonomy = 'post_tag')
     left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = 2182 )
                    left JOIN wp_term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_id
                    AND catrel.object_id = wp_posts.ID)
                    left JOIN wp_term_taxonomy AS c attax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_id
                    AND cattax.taxonomy = 'category')
     where (post_status IN ( 'publish',  'static' ) and ID != '2182') and post_password =''  and post_date > date_sub(now(), interval 12 month)  and post_type IN ('post', 'page')
     group by id
     having score >= 2.5 order by score desc limit 5 on duplicate key update date = now();

    I have had to disable the plugin!!! What should I do?

  2. Three million queries? Crashed your database? What do you mean by that?

Topic Closed

This topic has been closed to new replies.

About this Topic