[buddypress-trac] [BuddyPress Trac] #7500: Harmful bp_activity indexes

buddypress-trac noreply at wordpress.org
Tue Apr 11 15:10:29 UTC 2017


#7500: Harmful bp_activity indexes
--------------------------+-----------------------------
 Reporter:  brandonliles  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The indexes on the bp_activity table `hide_sitewide` and `is_spam` are
 harmful for query performance since the columns being indexed are
 tinyint(1). If MySQL uses these indexes it will likely result in table
 scans.

 A far more selective index would be:
 KEY `component_type_user_id_date_recorded` (`component`, `type`,
 `user_id`, `date_recorded`)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7500>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list