[wp-trac] [WordPress Trac] #39603: The more posts with similar names you have, the slower you save the next one
WordPress Trac
noreply at wordpress.org
Tue Jan 17 04:19:30 UTC 2017
#39603: The more posts with similar names you have, the slower you save the next
one
-------------------------------------------------+-------------------------
Reporter: bisyarin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Posts, Post Types | Review
Severity: normal | Version:
Keywords: needs-testing needs-unit-tests | Resolution:
needs-patch | Focuses:
| performance
-------------------------------------------------+-------------------------
Changes (by rmccue):
* keywords: has-patch needs-testing needs-unit-tests => needs-testing
needs-unit-tests needs-patch
Comment:
Ouch. I figured MySQL would do a natural sort here, but guess not.
The other solution I can think of would be to do `ORDER BY
LENGTH(post_name) DESC, post_name`, but a) the performance would likely
suck, and b) this would fail with `foo-a-b` and `foo-1`.
Leaving open, as we should keep exploring how to improve the performance,
but switching to a direct query doesn't appear to be a good solution here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39603#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list