[wp-trac] [WordPress Trac] #12891: Advanced multi-taxonomy WP_Query()s

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 16 21:53:08 UTC 2010


#12891: Advanced multi-taxonomy WP_Query()s
----------------------------+-----------------------------------------------
 Reporter:  markjaquith     |       Owner:  markjaquith    
     Type:  task (blessed)  |      Status:  assigned       
 Priority:  normal          |   Milestone:  3.1            
Component:  Query           |     Version:  3.0.1          
 Severity:  normal          |    Keywords:  ongoing-project
----------------------------+-----------------------------------------------

Comment(by ryan):

 It is faster than 3.0 except for excludes, which are very slow.

 {{{
 SELECT SQL_CALC_FOUND_ROWS wp_3508545_posts.* FROM wp_3508545_posts
 INNER JOIN wp_3508545_term_relationships ON (wp_3508545_posts.ID =
 wp_3508545_term_relationships.object_id) WHERE 1=1 AND
 wp_3508545_term_relationships.term_taxonomy_id NOT IN
 (16,38415,45884,44849) AND wp_3508545_posts.post_type IN ('post', 'page',
 'attachment') AND (wp_3508545_posts.post_status = 'publish' OR
 wp_3508545_posts.post_status = 'private') ORDER BY
 wp_3508545_posts.post_date DESC LIMIT 0, 15
 }}}

 That took 35 seconds.

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


More information about the wp-trac mailing list