[buddypress-trac] [BuddyPress] #3972: Database query needs optimization - BP_Core_User->get_users
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Tue Jan 31 20:17:18 UTC 2012
#3972: Database query needs optimization - BP_Core_User->get_users
----------------------------+-----------------------------
Reporter: arpit.tambi.in | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Core | Version: 1.5.3
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => Future Release
Comment:
At least part of the slowness is coming from your join against xprofile
for the '%%United States%%' value. You must be doing that with a plugin -
BP does not do that out of the box.
That said, when we do counts, we should not be joining against usermeta
for last activity - that information is not useful for purposes of a
count. On the other hand, if we only mean to count users who have this
meta value (can't remember if that's intended), we could just count
DISTINCT(um.user_id), without the join against wp_users. It would probably
break plugins like the one you're using if we made this latter change (as
there would be no u.ID for your ON clause), so we can't do it for this
release - needs some more architecting.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3972#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list