[wp-trac] [WordPress Trac] #11914: "Users" admin list slow to generate on large sites

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


#11914: "Users" admin list slow to generate on large sites
--------------------------+-------------------------------------------------
 Reporter:  rowanbeentje  |       Owner:       
     Type:  defect (bug)  |      Status:  new  
 Priority:  normal        |   Milestone:  3.0  
Component:  Optimization  |     Version:  2.9.1
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:9 miqrogroove]:
 > Problem #2:  Why would the current user's capabilities ever affect the
 number of posts that have been created by someone else?

 the cap check, in practice, is really equivalent to adding a filtered:

 {{{
 post_type IN ('publish', 'private')
 }}}

 we might as well count drafts and pending posts. the issue (i.e. the OR or
 IN statement) won't easily go away, however, since we'll need to filter
 trashed posts no matter what.

 re the flow control, fixing it could be a possibility. something like
 this, for instance, could do the trick:

 {{{
 SELECT post_author, count(ID) FROM $wpdb->posts WHERE post_type = 'post'
 AND post_status <> 'trash' AND post_author IN ( $id_list ) GROUP BY
 post_author
 }}}

 but then, the above-mentioned filtered string no longer is around. if
 plugins introduce any kind of custom post statuses, the count would become
 completely irrelevant.

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


More information about the wp-trac mailing list