[wp-trac] [WordPress Trac] #19866: Allow specifications of any wp_posts field(s) in WP_Query

WordPress Trac noreply at wordpress.org
Sun Feb 1 19:46:40 UTC 2015


#19866: Allow specifications of any wp_posts field(s) in WP_Query
-----------------------------+----------------------
 Reporter:  bigdawggi        |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Query            |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch close  |     Focuses:
-----------------------------+----------------------
Changes (by boonebgorges):

 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Here's my takeaway from the above: The cases in which SELECTing only a
 subset of the fields is substantially more performant are rare. In those
 cases, devs can still use `WP_Query` to get the matched post IDs, and then
 pass them to custom SQL that SELECTs only the desired fields. As far as
 our API is concerned, we should be encouraging best practices, which will
 almost always mean 'fields=all' or 'fields=ids'.

 Based on this reading, I'm reclosing this ticket. If someone can generate
 benchmarks that show that this analysis way off the mark, please feel free
 to reopen with details.

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


More information about the wp-trac mailing list