[wp-trac] [WordPress Trac] #14796: start_post_rel_link() makes 3 DB queries; too much for what it offers

WordPress Trac wp-trac at lists.automattic.com
Fri Nov 19 23:31:09 UTC 2010


#14796: start_post_rel_link() makes 3 DB queries; too much for what it offers
--------------------------+-------------------------------------------------
 Reporter:  demetris      |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Performance   |     Version:  3.0.1          
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
Changes (by jeremyclarke):

 * cc: jer@… (added)


Comment:

 +1 for making the rel links require less queries. I had no idea they were
 there until I had to reverse engineer their presence based on the inane
 queries they generate (which were clogging my MySQL queue during a high-
 stress/outage period).

 All of these queries are simple and relatively fast if everything is okay,
 but as far as I can tell on my database (>60k published posts and >250k
 rows in wp_posts) ANY queries affecting wp_posts contribute to a cpu
 trashing everything-is-broken state.

 Caching such things in a transient is probably a good idea, espcially the
 'start' one, which will never ever ever change after the blog is
 installed. Having a query on every single.php for it is nuts.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14796#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list