Improve performance of BP_Core_User::get_users()
|Reported by:||shanebp||Owned by:||boonebgorges|
Apologies if this shouldn't be a ticket...
We have ~25k users.
We’re still on BP Version 1.2.9 – (working on upgrading to 1.3)
I’m wondering if the issue below is addressed by 1.3 and/or if there is something we can do on 1.2.9
Here is an example of a slow query:
SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.display_name, u.user_email , um.meta_value as last_activity FROM wp_users u LEFT JOIN wp_usermeta um ON um.user_id = u.ID WHERE u.user_status = 0 AND um.meta_key = 'last_activity' ORDER BY um.meta_value
I think this is coming from bp-core-classes -> function get_users
We’ve increased :
query_cache_size to 128M
query_cache_limit: to 2M
join_buffer_size to 2M
But we still have problems during high traffic.
Any suggestions on optimizing that query or some other approach ?
Change History (63)
- Component changed from Core to Members
- Milestone changed from Awaiting Review to 1.6
comment:9 boonebgorges — 2 years ago
- Keywords 1.7-early 2nd-opinion added
- Milestone changed from 1.6 to Future Release
- Severity changed from normal to critical
- Summary changed from slow queries in bp-core-classes to Improve performance of BP_Core_User::get_users()
- Type changed from defect (bug) to enhancement
comment:23 boonebgorges — 2 years ago
- Keywords 1.7-early removed
- Milestone changed from Future Release to 1.7
- Priority changed from normal to highest
- Owner set to boonebgorges
- Status changed from new to assigned