cache query results in _months_dropdown() ?
-
Hello! We are running Media Library Assistant 2.60 (promise we’ll update soon) and noticed some fairly heavy SQL queries running on admin editor pageloads:
#16 (186.9 ms)
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = ‘attachment’
ORDER BY post_date DESC#18 (177.3 ms)
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM wp_posts
WHERE post_type = ‘attachment’
ORDER BY post_date DESCAbout 350ms for us per admin pageload.
It seems like this could be a good candidate for the WP object cache, what do you think?
You’ve made a lovely plugin. Thank you for your time.
Cheers,
Chris
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘cache query results in _months_dropdown() ?’ is closed to new replies.