[wp-trac] [WordPress Trac] #15499: Add an index for get_lastpostmodified query
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 26 09:29:38 UTC 2012
#15499: Add an index for get_lastpostmodified query
------------------------------------+--------------------
Reporter: simonwheatley | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: Database | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+--------------------
Comment (by nacin):
I didn't catch that get_lastpostmodified() also calls get_lastpostdate(),
triggering the other query. Lame.
Here's the thing. I don't know why. get_lastpostdate() wants to know the
newest published post. Since it's published, it can't be in the future.
get_lastpostmodified() wants to know the latest modified date. There is
never going to be a situation that I can think of (aside from manually
messing around with the values) where the latest post_modified date in a
table is going to be less than the latest post_date in a table.
I think we can just axe the call to get_lastpostdate() from
get_lastpostmodified() for the same amount of functionality.
This compare-modified-and-last-post-date thing was introduced, no joke, in
[908]. Probably time it got challenged.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15499#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list