A single query change in Yoast SEO 27.8 cut root sitemap generation on a 2-million-user test site from over 300 seconds to 25 milliseconds. The release is a targeted performance review rather than a feature update, addressing several places in the plugin where database queries were running far more expensively than necessary — in some cases on every admin page load.
That result comes from how the plugin identifies eligible sitemap authors. Previously, Yoast SEO checked user capabilities — a method that forced MySQL to scan every user record without using database indexes. Switching to a has_published_posts argument lets the query use indexes instead, which is what collapsed the runtime from minutes to milliseconds on the test site.

The team also removed a legacy database join that had been quietly degrading sitemap performance on sites with large user tables. The join checked a user_level field that WordPress core deprecated in version 3.0, meaning it served no meaningful purpose but still added overhead to every author sitemap query. Three further optimizations address admin-side performance, each targeting a distinct problem area:
- Query caching for indexing notifications
- A heavy database query that counted unindexed posts was previously triggered daily — or every 15 minutes on busy sites. It now runs once and relies on existing cache invalidation logic that was already in place but not properly used.
- NOT EXISTS replacing NOT IN
- A subquery that built a full list of object IDs before filtering was rewritten to short-circuit as soon as a match is found, making post-count queries considerably faster on sites with thousands of posts.
- Batched SELECT queries
- Code that previously fetched post data one record at a time in a loop was refactored to retrieve up to 1,000 records in a single query, reducing database roundtrips by as many as 960 per operation for features including schema aggregation.
The query batching change matters most on content-heavy sites. Every time WordPress fetches data from the database, that round trip takes time — and doing it 1,000 times in sequence is far slower than doing it once for all 1,000 records. The refactored approach groups those requests into a single call, which makes operations like SEO content analysis noticeably faster.
Yoast notes that the capability-to-published-posts switch carries minimal risk because the has_published_posts check was already being applied at a later stage of sitemap generation, so the set of authors included in sitemaps remains effectively the same. Similarly, dropping the deprecated user_level join is considered safe given that the underlying framework has been out of use since WordPress 3.0.
The release also improves post editor performance by preventing unnecessary re-renders of the Yoast sidebar panel. Version 27.8 is available now through the standard WordPress plugin update channel, and Yoast has published a full breakdown of the changes.