Activities – Filter by user profile custom field.
I would like to know the best way to filter the activity feed by user profile custom field.
Add an activity meta to the activity with the profile custom field data when i want, then filter with the help of this activity meta. But i’m afraid my database is going to be quite big (I have 2millions activities actually) and with this solution i need to update my old activities.
Make one query first to get the users ids matching my profile custom field.
then filter the activity stream with this list of users ids (Note i Have 250k users and this list can be quite large – maybe this solution is not really performant)
A custom query to get the activities ids matching what i want, then passing thoses ids to bp_activity_get (i will do paging to don’t have a big activities id list).
Or maybe there is a better solution ?
Thank you !
- You must be logged in to reply to this topic.