[wp-trac] [WordPress Trac] #11823: Improve SQL query used by get_terms()

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 13:07:20 UTC 2010


#11823: Improve SQL query used by get_terms()
-------------------------+--------------------------------------------------
 Reporter:  sirzooro     |       Owner:  filosofo   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  3.0        
Component:  Taxonomy     |     Version:  3.0        
 Severity:  normal       |    Keywords:  needs-patch
-------------------------+--------------------------------------------------
 #11076 / [12658] changes `get_terms()` so it uses SQL query with multiple
 conditions in WHERE clause - one for each included / excluded term. It
 will be better to change generated SQL from:
 {{{
 AND (t.term_id = 1 OR t.term_id = 2 OR ...)
 AND (t.term_id <> 1 AND t.term_id <> 2 AND ...)
 }}}
 to:
 {{{
 AND t.term_id IN (1, 2, ...)
 AND t.term_id NOT IN (1, 2, ...)
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11823>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list