diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 7852f4cefa8..238c72e3e17 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -644,7 +644,7 @@ static std::tuple executeQueryImpl( } bool can_use_query_cache = - settings.allow_experimental_query_cache && settings.use_query_cache + settings.allow_experimental_query_cache && settings.use_query_cache && !internal && !ast->as(); if (!async_insert)