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

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 15 22:14:33 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):

 Sites that perform well with 3.0 fall over with very slow queries like the
 following when running 3.1:

 {{{
 SELECT object_id
 FROM wp_term_relationships
 WHERE 1 =1
 AND object_id
 IN (

 SELECT object_id
 FROM wp_term_relationships
 INNER JOIN wp_term_taxonomy
 USING ( term_taxonomy_id )
 INNER JOIN wp_terms
 USING ( term_id )
 WHERE taxonomy
 IN (
 'post_tag'
 )
 AND slug
 IN (
 'chevy-volt', 'fisker', 'ford', 'gm', 'karma', 'leaf', 'nissan',
 'roadster', 'tesla', 'v-vehicle', 'volt'
 )
 )
 AND object_id
 IN (

 SELECT object_id
 FROM wp_term_relationships
 INNER JOIN wp_term_taxonomy
 USING ( term_taxonomy_id )
 INNER JOIN wp_terms
 USING ( term_id )
 WHERE taxonomy
 IN (
 'primary_channel'
 )
 AND slug
 IN (
 'all'
 )
 )
 }}}

 That takes over a minute.

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


More information about the wp-trac mailing list