[wp-trac] [WordPress Trac] #54555: Slow media query on big sites

WordPress Trac noreply at wordpress.org
Thu Dec 2 07:50:02 UTC 2021

#54555: Slow media query on big sites
 Reporter:  lebada        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.8.2
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
 On wordpress version 5.8.2 the wp_enqueue_media() slow query is still
 there. I found several old discussions about being fixed for many years
 ago but in my case is still there.

 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
 FROM wp_posts
 WHERE post_type = 'attachment'
 ORDER BY post_date DESC


 I have 73903 media items

Ticket URL: <https://core.trac.wordpress.org/ticket/54555>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list