Fix 02494_query_result_cache_min_query_duration

This commit is contained in:
Robert Schulze 2022-12-17 18:10:02 +00:00
parent bc6bcdfd7b
commit 83ea8deeee
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 8 additions and 9 deletions

View File

@ -7,10 +7,10 @@ SELECT 1 SETTINGS enable_experimental_query_result_cache = true;
SELECT COUNT(*) FROM system.queryresult_cache;
1
SYSTEM DROP QUERY RESULT CACHE;
-- ... but this not because the query executes much faster than the milliseconds threshold
SET query_result_cache_min_query_duration = 10000;
-- ... but this does not because the query executes much faster than the milliseconds threshold
SET query_result_cache_max_entry_size = 10000;
SELECT 1 SETTINGS enable_experimental_query_result_cache = true;
1
SELECT COUNT(*) FROM system.queryresult_cache;
0
1
SYSTEM DROP QUERY RESULT CACHE;

View File

@ -2,17 +2,16 @@
SYSTEM DROP QUERY RESULT CACHE;
-- this does not create a cache entry ...
SET query_result_cache_max_entry_size = 0;
-- this does create an entry in the query result cache
SELECT 1 SETTINGS enable_experimental_query_result_cache = true;
SELECT count(*) FROM system.queryresult_cache;
SELECT COUNT(*) FROM system.queryresult_cache;
SYSTEM DROP QUERY RESULT CACHE;
-- ... but this does
SET query_result_cache_max_entry_size = 9999999;
-- ... but this does not because the query executes much faster than the milliseconds threshold
SET query_result_cache_max_entry_size = 10000;
SELECT 1 SETTINGS enable_experimental_query_result_cache = true;
SELECT count(*) FROM system.queryresult_cache;
SELECT COUNT(*) FROM system.queryresult_cache;
SYSTEM DROP QUERY RESULT CACHE;