[wp-trac] [WordPress Trac] #41281: attachment_url_to_postid results in very slow query
WordPress Trac
noreply at wordpress.org
Wed Sep 11 04:13:32 UTC 2019
#41281: attachment_url_to_postid results in very slow query
------------------------------+------------------------------
Reporter: Takahashi_Fumiki | Owner: joemcgill
Type: enhancement | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 4.9
Severity: normal | Resolution:
Keywords: | Focuses: performance
------------------------------+------------------------------
Comment (by Takahashi_Fumiki):
I agree with @archon810 because cache itself is not a fundamental
solution.
Without index on `meta_value`, it may take over 60 seconds just for one
query with a large volume of posts.
MySQL will hang up with requests in rapid succession, so there's no chance
to hold cache and use it.
Since more than 10 years have been passed from WordPress' first release,
WP sites with 100,000 posts are common.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41281#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list