[wp-trac] [WordPress Trac] #42883: Use sargable queries for date-based lookups for posts

WordPress Trac noreply at wordpress.org
Fri Feb 16 14:40:20 UTC 2018


#42883: Use sargable queries for date-based lookups for posts
------------------------------------+-----------------------------
 Reporter:  ComputerGuru            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Query                   |     Version:  3.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  performance
------------------------------------+-----------------------------

Comment (by jdgrimes):

 I just took a quick look at the patch, and I noticed a couple of things:

 - A very small issue, but the parameter descriptions in the method
 docblock should end in a period.
 - It doesn't look to me like the `=`, `!=`, etc., comparison operators are
 being handled properly. Unless I am missing something, they will fall
 through to the `default` block in the `switch` and then just the year
 value will be returned rather than a full condition.

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


More information about the wp-trac mailing list