Any quicker alternative for WP_Query "NOT IN"

I am using the following wp_query to pull up a list of post, and I want to exclude a few categories of a custom taxonomy.

It works well, however Query Monitor is telling me that the query is slow.

I removed the 'tax_query' part of the query and it sped up.

Is there a faster way to exclude these categories?

Thanks!

My Query:

$args = array(
    'post_type'         = array( 'recipe' ),
    'post_status'       = array( 'publish' ),
    'order'             = 'DESC',
    'orderby'           = 'date',
    'posts_per_page'    = 40,
    'no_found_rows'     = true,
    'tax_query'         = array(
        array(
            'taxonomy' = 'ingredients',
            'field'    = 'slug',
            'operator' = 'NOT IN',
            'terms'    = array( 'onion', 'pepper', 'bean' )
        )
    )
);

Topic tax-query wp-query Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.