Skip to:

Opened 13 years ago

Closed 8 years ago

#3496 closed enhancement (no action required)

Faster query for sitewide activity option

Reported by: finzend's profile finzend Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Activity Keywords:


In buddypress/bp-activity/bp-activity-classes.php on line 116 I've changed the following code:


$where_conditions['hidden_sql'] = "a.hide_sitewide = 0";


$where_conditions['hidden_sql'] = "a.hide_sitewide != 1";

This makes the query a lot faster! With the same result I think?

Change History (3)

#1 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 1.5
  • Version 1.2.9 deleted

The problem is hide_sitewide is missing an index. See #3497.

#2 @boonebgorges
13 years ago

  • Milestone changed from 1.5 to Future Release

hide_sitewide does have an index:

It's too late to make this change during the current dev cycle. There may be plugins that are introducing their own values for hide_sitewide (see for what such a plugin might be), and changing the check here could break them.

#3 @DJPaul
8 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Boone reworked Activity queries a couple of years ago. I'm going to assume the suggestion in this 5 year old ticket is no longer relevant or has already been implemented (the original report is light on specific details).

Note: See TracTickets for help on using tickets.