[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:12:03 UTC 2010
#11914: "Users" admin list slow to generate on large sites
--------------------------+-------------------------------------------------
Reporter: rowanbeentje | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Future Release
Component: Optimization | Version: 2.9.1
Severity: minor | Keywords: users mysql slow query
--------------------------+-------------------------------------------------
Comment(by miqrogroove):
Guys, I'm really confused by this query. This would be the pseudo code:
Count all posts, WHERE one specified user is the author, AND current user
is the author OR has private reading caps.
Problem #1: get_usernumposts() is being called from inside of user_row(),
which is the worst possible flow of control for query optimization.
{{{
foreach ( $wp_user_search->get_results() as $userid ) {
echo "\n\t" . user_row($user_object, $style, $role);
}
}}}
Problem #2: Why would the current user's capabilities ever affect the
number of posts that have been created by someone else?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11914#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list