Related Post WordPress Plugin Crashes.

related-posts-Crashes

related-posts-Crashes

The wordpress plugin for related posts crashes database server. I think its new cache feature is not much optimised. The following query takes too much time to execute.

Count: 3625 Time=20.18s (73167s) Lock=8.85s (32085s) Rows=0.0 (0), 388840_mmuser[388840_mmuser]@28hosts
insert into wp_yarpp_related_cache (reference_ID,ID,score) (SELECT N, ID, (N+ (MATCH (post_content) AGAINST (‘S’)) * N+ (MATCH (post_title) AGAINST (‘S’)) * N+ COUNT( DISTINCT cattax.term_taxonomy_id ) * N) as score
from wp_posts
left join wp_term_relationships as blockrel on (wp_posts.ID = blockrel.object_id)
left join wp_term_taxonomy as blocktax using (`term_taxonomy_id`)
left join wp_terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in (N))
left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = N )
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 = ‘S’)
where (post_status IN ( ‘S’, ‘S’ ) and ID != ‘S’) and post_password =’S’
group by id
having score >= N.N and count(blockterm.term_id) = N order by score desc limit N) union (SELECT N, ID, (N+ (MATCH (post_content) AGAINST (‘S’)) * N+ (MATCH (post_title) AGAINST (‘S’)) * N+ COUNT( DISTINCT cattax.term_taxonomy_id ) * N) as score
from wp_posts
left join wp_term_relationships as blockrel on (wp_posts.ID = blockrel.object_id)
left join wp_term_taxonomy as blocktax using (`term_taxonomy_id`)
left join wp_terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in (N))
left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = N )
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 = ‘S’)
where (post_status IN ( ‘S’, ‘S’ ) and ID != ‘S’) and post_password =’S’
group by id
having score >= N.N and count(blockterm.term_id) = N order by score desc limit N) on duplicate key update date = now()

Count: 3625 Time=20.18s (73167s) Lock=8.85s (32085s) Rows=0.0 (0), 388840_mmuser[388840_mmuser]@28hostsinsert into wp_yarpp_related_cache (reference_ID,ID,score) (SELECT N, ID, (N+ (MATCH (post_content) AGAINST (‘S’)) * N+ (MATCH (post_title) AGAINST (‘S’)) * N+ COUNT( DISTINCT cattax.term_taxonomy_id ) * N) as scorefrom wp_posts left join wp_term_relationships as blockrel on (wp_posts.ID = blockrel.object_id)left join wp_term_taxonomy as blocktax using (`term_taxonomy_id`)left join wp_terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in (N))left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = N ) left JOIN wp_term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_idAND catrel.object_id = wp_posts.ID)left JOIN wp_term_taxonomy AS cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_idAND cattax.taxonomy = ‘S’)where (post_status IN ( ‘S’, ‘S’ ) and ID != ‘S’) and post_password =’S' group by id having score >= N.N and count(blockterm.term_id) = N order by score desc limit N) union (SELECT N, ID, (N+ (MATCH (post_content) AGAINST (‘S’)) * N+ (MATCH (post_title) AGAINST (‘S’)) * N+ COUNT( DISTINCT cattax.term_taxonomy_id ) * N) as scorefrom wp_posts left join wp_term_relationships as blockrel on (wp_posts.ID = blockrel.object_id)left join wp_term_taxonomy as blocktax using (`term_taxonomy_id`)left join wp_terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in (N))left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = N ) left JOIN wp_term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_idAND catrel.object_id = wp_posts.ID)left JOIN wp_term_taxonomy AS cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_idAND cattax.taxonomy = ‘S’)where (post_status IN ( ‘S’, ‘S’ ) and ID != ‘S’) and post_password =’S' group by id having score >= N.N and count(blockterm.term_id) = N order by score desc limit N) on duplicate key update date = now()

More people are reporting this issue so far. I think some solution will be available from the developer to solve this. If you come over any solution please share it.

Leave a Reply

Copyright © 2012 Mesmerizing Moments | sarathdr.com.