Opened 13 years ago
Closed 9 years ago
#3496 closed enhancement (no action required)
Faster query for sitewide activity option
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | |
Cc: |
Description
In buddypress/bp-activity/bp-activity-classes.php on line 116 I've changed the following code:
old:
$where_conditions['hidden_sql'] = "a.hide_sitewide = 0";
new:
$where_conditions['hidden_sql'] = "a.hide_sitewide != 1";
This makes the query a lot faster! With the same result I think?
Change History (3)
#2
@
13 years ago
- Milestone changed from 1.5 to Future Release
hide_sitewide does have an index: http://buddypress.trac.wordpress.org/browser/trunk/bp-core/admin/bp-core-schema.php#L72
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 http://buddypress.trac.wordpress.org/ticket/2544 for what such a plugin might be), and changing the check here could break them.
#3
@
9 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).
The problem is hide_sitewide is missing an index. See #3497.