[buddypress-trac] [BuddyPress] #5128: Move user and group last_activity out of wp_usermeta

buddypress-trac noreply at wordpress.org
Thu Aug 1 18:32:16 UTC 2013


#5128: Move user and group last_activity out of wp_usermeta
--------------------------+-----------------
 Reporter:  boonebgorges  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  high          |  Milestone:  1.9
Component:  Core          |    Version:
 Severity:  major         |   Keywords:
--------------------------+-----------------
 See https://buddypress.trac.wordpress.org/ticket/4060#comment:3 and
 ensuing discussion for some background.

 BP does lots of sorting and filtering by users' (and to some extent
 groups', though users are much more problematic and important)
 'last_activity' meta value. But this scales very poorly, as the
 wp_usermeta table is very much not designed for this kind of thing. The
 changes introduced by `BP_User_Query` help by removing some of the worst-
 offending JOINs, but the fundamental problem remains: last_activity data
 should be stored somewhere where it can be properly indexed and typed, so
 that queries and sorts are reasonably fast.

 My initial proposal is that we move last_activity to the bp_activity
 table, which is already structured properly. (There are two other
 possibilities that I might also explore: adding a column to the wp_users
 table and adding a separate last_activity table.)

 Challenges:
 - backward compatibility. Should we sync back to last_activity just for
 this purpose?
 - If moving into bp_activity, we'll need that component, or at least a
 minimal subset of it, to be active at all times

 I'll work up a proof-of-concept soon, and try to run some benchmarks to
 show that it's worthwhile. Thoughts and feedback welcome in the meantime.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5128>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list