[wp-trac] [WordPress Trac] #8071: Refrain from querying all the comments on a post when paged

WordPress Trac noreply at wordpress.org
Fri Sep 25 14:21:01 UTC 2015


#8071: Refrain from querying all the comments on a post when paged
------------------------------------+---------------------------
 Reporter:  markjaquith             |       Owner:  boonebgorges
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.4
Component:  Comments                |     Version:  2.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+---------------------------

Comment (by boonebgorges):

 Thinking more about recent patches, I'm going to remove the filter on the
 `SELECT FOUND_ROWS()` query altogether. `SELECT FOUND_ROWS()` itself is
 not costly - it's `SQL_CALC_FOUND_ROWS` that introduces overhead. For the
 time being, if a dev doesn't like the way WP gets a total comment count,
 it can be disabled with 'no_count_rows=true'. Alternative methods for
 counting (`SELECT COUNT(*) WHERE...`) can be achieved independently.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/8071#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list