[wp-trac] [WordPress Trac] #45913: wp_enqueue_media() - slow query
WordPress Trac
noreply at wordpress.org
Thu Jan 10 17:11:32 UTC 2019
#45913: wp_enqueue_media() - slow query
--------------------------+-----------------------------
Reporter: lubimow | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I have sites with very large databases and I've noticed some slow queries
since 5.0.3 on new/edit post screens:
{{{
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = 'attachment'
ORDER BY post_date DESC
}}}
This query is coming from wp_enqueue_media()
I am using php 7.2.1, MySQL 5.7.24
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45913>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list