[wp-trac] [WordPress Trac] #10964: Improving query_posts performance

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 13 03:30:22 UTC 2010


#10964: Improving query_posts performance
-------------------------+--------------------------------------------------
 Reporter:  buch0090     |       Owner:                        
     Type:  enhancement  |      Status:  new                   
 Priority:  normal       |   Milestone:  Awaiting Triage       
Component:  Performance  |     Version:  2.8.4                 
 Severity:  normal       |    Keywords:  has-patch tested early
-------------------------+--------------------------------------------------

Comment(by Klark0):

 Yup,  I have it running on my production site (running 3.0.1) for a day
 and so far it has improved performance greatly.  Server load averaged at
 1.2 all day, usually it's like 5.

 There's still some slow queries though as someone mentioned before, but
 not nearly as many.
 examples:


 {{{
 SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  INNER JOIN
 wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
 INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id =
 wp_term_taxonomy.term_taxonomy_id)  WHERE 1=1  AND
 wp_term_taxonomy.taxonomy = 'category'  AND wp_term_taxonomy.term_id IN
 ('77', '1', '58', '63', '64')  AND wp_posts.post_type = 'post' AND
 (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY
 wp_posts.post_date DESC LIMIT 0, 1;


 SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  WHERE 1=1  AND
 wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER
 BY wp_posts.post_date DESC LIMIT 0, 15;


 }}}

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


More information about the wp-trac mailing list