Network admin pages don't scale
|Reported by:||ryan||Owned by:||ryan|
Description (last modified by ryan)
network/sites.php and network/users.php do queries like:
SELECT COUNT(wp_trunk_users.ID) FROM wp_trunk_users WHERE 1=1 SELECT COUNT( blog_id ) FROM wp_trunk_blogs WHERE site_id = '1'ORDER BY wp_trunk_blogs.blog_id ASC
These are very slow on large networks. get_blog_count() and get_user_count() would mitigate this somewhat, although they too can cause problem on large networks.
Perhaps users.php and sites.php should consult get_user_count() and get_blog_count() and not do a query if the count is over a certain threshold. The tables would default to being empty and a search would have to be performed to get results.
Further, a large network flag may be needed so that functions like get_blog_count() and get_user_count() can avoid ever running COUNT queries and instead rely on the network administrator to perform counts and populate the count site options via a separate job.
Change History (32)
- Keywords iceberg added
- Owner set to ryan
- Status changed from new to assigned