Internet

Related Post WordPress Plugin Crashes.

June 8, 2010 by Sarath DR in Internet with 0 Comments
related posts by category wordpress tutorial2 Related Post Wordpress Plugin 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.

Tagged , , , ,

Share this to

Related Posts

Leave a reply

Your email address will not be published. Required fields are marked *

*

About
View Sarath D R's profile on LinkedIn

I am a technology consultant and an entrepreneur focused on the following technologies Java,Spring, Android, Angular, Asterisk, Symfony, Cake , Code-Igniter, Jquery , XAMPP, XHTML, AJAX, MySql, Seo, Web Design, Wordpress, iPhone development.

Today’s Tips
  • Generate Codova.jar file from Phonegap project using ant
  • Google map javascript client  to find the geographic co-ordinates  from  Address or post code
  • Update Android main UI from Webview – Phonegap Plugin
  • Jplayer is not working  with HTC One Android 4.3 version browser
  • Regular expression to validate mobile phone numbers starting with + ( plus ) – php
  • Simple pagination script for PHP
  • Useful adb ( Android Debug Bridge ) commands
  • Change the javascript files url to absolute url – Symfony 1.4
  • Set Http authentication header from Client – PHP / CURL

This site uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.This site also uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.

Close