Optimise WP_Query with no_found_rows, update_post_meta_cache, and fields ...
Make secondary WP_Query loops cheaper: no_found_rows, cache flags and fields A default new WP_Query() does more than select posts. It also counts all matching posts for pagination (SQL_CALC_FOUND_ROWS plus SELECT FOUND_ROWS()), loads the meta of all found posts into the cache and loads their terms. For the main query of an archive that is what…