[buddypress-trac] [BuddyPress] #4041: Use SELECT FOUND_ROWS() for 'total' queries instead of a second query
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Feb 24 03:57:53 UTC 2012
#4041: Use SELECT FOUND_ROWS() for 'total' queries instead of a second query
----------------------------+-----------------------
Reporter: boonebgorges | Owner: DJPaul
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 1.6
Component: All Components | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------
Comment (by webraket):
I recently experienced bad results using SELECT FOUND_ROWS().
SQL_CALC_FOUND_ROWS seems to trigger a filesort when ORDER BY is used.
This behavior should be fixed in mysql > 5.6.2,
http://bugs.mysql.com/bug.php?id=18454
For now I think it's better/faster to just keep the 2nd query.
The ORDER BY and SORT parts should be removed however, since it's slow(er)
and useless.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4041#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list