[wp-trac] [WordPress Trac] #29178: Using WP_Query only for result of SQL_CALC_FOUND_ROWS

WordPress Trac noreply at wordpress.org
Thu Oct 16 03:37:15 UTC 2014


#29178: Using WP_Query only for result of SQL_CALC_FOUND_ROWS
------------------------------------------+-----------------------------
 Reporter:  danielbachhuber               |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Query                         |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------

Comment (by boonebgorges):

 >  Using update_post_meta_cache => false and update_post_term_cache =>
 false means using WP_Query still produces two queries.

 What two queries? `SELECT ... ID` and `FOUND_ROWS()`? Not sure that
 `SELECT SQL_CALC_FOUND_ROWS` and `FOUND_ROWS()` can be separated from each
 other :) Or are you talking about the query that fills in post data for
 the located IDs? This can be skipped by passing `'fields' => 'ids'`.

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


More information about the wp-trac mailing list