[wp-trac] Re: [WordPress Trac] #4365: Deleting a category scales poorly

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 9 09:32:49 GMT 2009


#4365: Deleting a category scales poorly
--------------------------+-------------------------------------------------
 Reporter:  markjaquith   |       Owner:  Denis-de-Bernardy
     Type:  defect (bug)  |      Status:  accepted         
 Priority:  normal        |   Milestone:  2.9              
Component:  Performance   |     Version:                   
 Severity:  normal        |    Keywords:  needs-patch      
--------------------------+-------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:9 vladimir_kolesnikov]:
 > Subqueries? Why? In many cases JOINs are faster (MySQL optimizer does
 not handle subqueries well until 5.x).

 Agreed. On occasion, they're a little easier to read, though.

 {{{
 select *
 from a
 left join b
 on b.id = a.id
 and condition
 where a.id is null

 select *
 from a
 where a.id not in ( select b.id where condition )
 }}}

 they're also useful to extract constants:

 {{{
 select *
 from a
 where a.field = ( select max( field ) from b )
 }}}

 I'm sure we'll find them good use in 2.9

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


More information about the wp-trac mailing list