You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The posts queries from the plugin are uncached and can sometimes be "expensive" comparatively to other queries due to their complexity.
Example query, which takes >5ms on WordPress.org:
SELECT wp_posts.*
FROM wp_posts
INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
INNER JOIN wp_postmeta AS mt1
ON ( wp_posts.ID = mt1.post_id )
INNER JOIN wp_postmeta AS mt2
ON ( wp_posts.ID = mt2.post_id )
INNER JOIN wp_postmeta AS mt3
ON ( wp_posts.ID = mt3.post_id )
INNER JOIN wp_postmeta AS mt4
ON ( wp_posts.ID = mt4.post_id )
WHERE 1=1
AND ( ( wp_postmeta.meta_key = 'team' AND wp_postmeta.meta_value = 'polyglots' )
AND ( ( ( mt1.meta_key = 'recurring' AND mt1.meta_value NOT IN ('weekly','biweekly','occurrence','monthly','1') )
AND ( mt2.meta_key = 'start_date' AND CAST(mt2.meta_value AS DATE) >= CURDATE() ) )
OR ( ( mt3.meta_key = 'recurring'
AND mt3.meta_value IN ('weekly','biweekly','occurrence','monthly','1') )
AND ( ( mt4.meta_key = 'end_date' AND mt4.meta_value = '' )
OR ( mt4.meta_key = 'end_date' AND CAST(mt4.meta_value AS DATE) > CURDATE() ) ) ) ) )
AND wp_posts.post_type = 'meeting'
AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private')
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC
It'd probably be faster to just query all meeting entries and filter it in PHP...
The text was updated successfully, but these errors were encountered:
dd32
changed the title
Add object caching
Add object caching of meeting queries
Oct 1, 2020
The posts queries from the plugin are uncached and can sometimes be "expensive" comparatively to other queries due to their complexity.
Example query, which takes >5ms on WordPress.org:
It'd probably be faster to just query all meeting entries and filter it in PHP...
The text was updated successfully, but these errors were encountered: