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

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 19 18:43:33 UTC 2010


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

Comment(by buch0090):

 I have this on our staging environment and looks good. here's an example
 of 3 queries generated by a custom widget to display recent posts...I'll
 check in next week, plan on having this on production by Monday, using
 WPMU 2.8.5.

 Time: 0.018220901489258
 Query: SELECT SQL_CALC_FOUND_ROWS wp_1_posts.ID FROM wp_1_posts WHERE 1=1
 AND wp_1_posts.ID IN (136362,136280,136334,136392,136292,136355,136282)
 AND wp_1_posts.post_type = 'post' AND (wp_1_posts.post_status = 'publish'
 OR wp_1_posts.post_status = 'private') ORDER BY wp_1_posts.post_date DESC
 LIMIT 0, 10
 Call from: require, require_once, include, dynamic_sidebar,
 call_user_func_array, WP_Widget->display_callback,
 dmc_top_stories_simple_widget->widget, query_posts, WP_Query->query,
 WP_Query->get_posts

 # Time: 0.00015687942504883
 Query: SELECT FOUND_ROWS()
 Call from: require, require_once, include, dynamic_sidebar,
 call_user_func_array, WP_Widget->display_callback,
 dmc_top_stories_simple_widget->widget, query_posts, WP_Query->query,
 WP_Query->get_posts

 # Time: 0.00025701522827148
 Query: SELECT wp_1_posts.* FROM wp_1_posts WHERE 1 = 1 AND wp_1_posts.ID
 IN ( 136392,136355,136334,136282,136280 ) ORDER BY wp_1_posts.post_date
 DESC
 Call from: require, require_once, include, dynamic_sidebar,
 call_user_func_array, WP_Widget->display_callback,
 dmc_top_stories_simple_widget->widget, query_posts, WP_Query->query,
 WP_Query->get_posts

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


More information about the wp-trac mailing list