[buddypress-trac] [BuddyPress] #5210: Using DISTINCT in the select statement when retrieving activity data slows down the query

buddypress-trac noreply at wordpress.org
Sat Oct 26 22:52:12 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             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by boonebgorges):

 Thanks very much for this info. I'm going to do some experimentation of my
 own, but in the meantime, perhaps you could run a similar EXPLAIN for the
 following query:

 `EXPLAIN SELECT DISTINCT id FROM wp_bp_activity WHERE is_spam = 0 AND
 hide_sitewide = 0 AND type != 'activity_comment' ORDER BY date_recorded
 DESC LIMIT 0, 20;`

 Basically, I want to see whether querying only for activity ids (rather
 than fetching all kinds of data at once) will have any appreciable effect.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5210#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list