[wp-trac] [WordPress Trac] #14426: unneeded "SELECT FOUND_ROWS()" when no posts are found

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 2 19:55:52 UTC 2012


#14426: unneeded "SELECT FOUND_ROWS()" when no posts are found
--------------------------+-----------------------------
 Reporter:  mark-k        |       Owner:
     Type:  enhancement   |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Optimization  |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  worksforme =>


Comment:

 Replying to [comment:10 wonderboymusic]:
 > I no longer see the {{{SELECT FOUND_ROWS()}}} happening after empty
 query results

 This is partly fixed in [19918], but only if `$split_the_query` is true:
 [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.4.1/wp-
 includes/query.php#L2630

 If `$split_the_query` is false, `set_found_posts()` still runs regardless
 of empty results.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14426#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list