Opened 3 years ago
Last modified 2 years ago
#15170 closed defect (bug)
Network admin pages don't scale — at Version 1
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Multisite | Version: | 3.1 |
| Severity: | normal | Keywords: | ongoing-project |
| Cc: |
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.
