[wp-trac] [WordPress Trac] #42256: Skip SQL_CALC_FOUND_ROWS when using post__in whose count matches posts_per_page

WordPress Trac noreply at wordpress.org
Tue Nov 21 02:53:27 UTC 2017


#42256: Skip SQL_CALC_FOUND_ROWS when using post__in whose count matches
posts_per_page
--------------------------+------------------------------
 Reporter:  ethitter      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by boonebgorges):

 What if the values in `post__in` point to non-existent posts? Or, perhaps
 more likely, what if the combination of `post__in` with some other param
 (say, a `meta_query`) makes it so that only a subset of the `post__in`
 items are grabbed?

 It feels safer to let plugins decide whether they're passing query
 parameters that guarantee that all and only the items in `post__in` will
 end up in the results array. If the plugin knows this, it can pass
 `no_found_rows` explicitly.

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


More information about the wp-trac mailing list