[buddypress-trac] [BuddyPress] #5210: Using DISTINCT in the select statement when retrieving activity data slows down the query
buddypress-trac
noreply at wordpress.org
Tue Oct 22 20:03:36 UTC 2013
#5210: Using DISTINCT in the select statement when retrieving activity data slows
down the query
-------------------------+-----------------------------
Reporter: kwerri | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Activity | Version: 1.8.1
Severity: normal | Keywords:
-------------------------+-----------------------------
In this line in bp-activity/bp-activity-classes.php:
$select_sql = "SELECT DISTINCT a.*, u.user_email, u.user_nicename,
u.user_login, u.display_name";
The inclusion of the distinct causes the creation of a temporary table.
The creation and removal of this temporary table can dramatically impact
how long it takes for the query to run, especially for wp_bp_activity
tables with a lot of data.
Is this needed, and would you guys consider removing it?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5210>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list