[buddypress-trac] [BuddyPress] #4018: @mentions (slow query)

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Feb 23 03:11:04 UTC 2012


#4018: @mentions (slow query)
-------------------------------------+--------------------
 Reporter:  webraket                 |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  1.6
Component:  Activity                 |     Version:  1.5.3
 Severity:  major                    |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------

Comment (by webraket):

 '''Note that a mysql fulltext index is required on bp_activity.content
 before it works.'''

 I also changed SELECT count(a.id)... to SELECT FOUND_ROWS(), because it
 was too slow:

 {{{
 SELECT count(a.id) FROM wp_bp_activity a WHERE a.hide_sitewide = 0;
 #Query_time: 22.023288  Lock_time: 0.000031 Rows_sent: 1  Rows_examined:
 610762
 }}}

 SELECT FOUND_ROWS() is noticeable faster and prevents a 2nd full-table
 scan/resultset.

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


More information about the buddypress-trac mailing list