• I am getting shut down occasionally by my hosting provider by what appears to be a long-running query that is taking up too much CPU. I believe it is related to the Yet Another Related Posts Plugin. Here is the query. Any insight?

    SELECT ID, post_title, post_date, post_content, (MATCH (post_content) AGAINST (‘ homer obama vote mccain simpson funnier change him changes before simpsons subtle honestly win shot anyway axisofright able maybe’)) as bodyscore, (MATCH (post_title) AGAINST (‘vote changes simpson homer’)) as titlescore, COUNT( DISTINCT tagtax.term_taxonomy_id ) AS tagscore, COUNT( DISTINCT cattax.term_taxonomy_id ) AS catscore, ((MATCH (post_content) AGAINST (‘ homer obama vote mccain simpson funnier change him changes before simpsons subtle honestly win shot anyway axisofright able maybe’)) * 1 + (MATCH (post_title) AGAINST (‘vote changes simpson homer’)) * 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 = 3186 ) left JOIN wp_term_relationships AS tagrel on (tagrel.term_taxonomy_id = thistag.term_taxonomy_id 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 = 3186 ) 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 cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_id AND cattax.taxonomy = ‘category’) where (post_status IN ( ‘publish’, ‘static’ ) && ID != ‘3186’) and post_date <= ‘2008-10-06 18:21:52’ and post_password =” and post_type IN (‘post’, ‘page’) GROUP BY id having score >= 5 order by score DESC limit 5

  • The topic ‘[Plugin: Yet Another Related Posts Plugin] Long Running Query’ is closed to new replies.