Advanced Archive Query Tweaks
Beyond the big archive optimisations, the Query Speed tab has four smaller toggles. Each targets a specific inefficiency in how WordPress builds the main query, and each is worth understanding on its own. None of them changes what your visitors see, they just remove work MySQL doesn’t need to do.
Remove CAST on wp_postmeta. In some meta queries WordPress wraps the column in CAST(meta_value AS CHAR). The trouble is that wrapping a column in a function stops MySQL using any index on it, so a query that could have used your meta_value index falls back to a scan instead. Enabling this removes the redundant CAST so the index can do its job. This pairs naturally with the custom indexes from the Indexes tab.
Optimise WooCommerce Group By. WooCommerce archive queries sometimes carry a GROUP BY or DISTINCT that isn’t needed when the query only selects post IDs, since those are already unique. Grouping and de-duplicating rows for no reason is pure overhead. This option removes the redundant GROUP BY, letting the query finish sooner.
Remove sort options. On very large custom post type archives, the ORDER BY clause can be a significant cost, forcing MySQL to sort a huge result set. Where the natural order of the rows is perfectly fine, this option skips that sort entirely and saves the work.
Remove OR check for private items on front end. WordPress adds an OR condition to the query so that users who are allowed to see private posts can do so. For a logged-out visitor that check can never match anything, so it’s pointless. This option drops it for front-end visitors, simplifying the query.
In short: these four Query Speed toggles each strip out a specific piece of unnecessary work, letting indexes engage, cutting redundant grouping and sorting, and dropping checks that don’t apply. Turn on the ones that fit your site and your archive queries get leaner.