mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Extend tests for compression of query cache entries
This commit is contained in:
parent
e79343c169
commit
11556a23ad
6532
tests/queries/0_stateless/02494_query_cache_compression.reference
Normal file
6532
tests/queries/0_stateless/02494_query_cache_compression.reference
Normal file
File diff suppressed because it is too large
Load Diff
444
tests/queries/0_stateless/02494_query_cache_compression.sql
Normal file
444
tests/queries/0_stateless/02494_query_cache_compression.sql
Normal file
@ -0,0 +1,444 @@
|
||||
-- Tags: no-parallel
|
||||
-- Tag no-parallel: Messes with internal cache
|
||||
|
||||
SET allow_experimental_query_cache = true;
|
||||
|
||||
SYSTEM DROP QUERY CACHE;
|
||||
|
||||
DROP TABLE IF EXISTS t;
|
||||
|
||||
-- Create test table with lot's of rows
|
||||
CREATE TABLE t(c String) ENGINE=MergeTree ORDER BY c;
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('abc') ('jkl');
|
||||
OPTIMIZE TABLE t FINAL;
|
||||
|
||||
-- Run query which, store *compressed* result in query cache
|
||||
SELECT '-- insert with enabled compression';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS use_query_cache = true, query_cache_compress_entries = true;
|
||||
|
||||
-- Run again to check that no bad things happen and that the result is as expected
|
||||
SELECT '-- read from cache';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS use_query_cache = true;
|
||||
|
||||
SYSTEM DROP QUERY CACHE;
|
||||
|
||||
-- Run query which, store *uncompressed* result in query cache
|
||||
SELECT '-- insert with disabled compression';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS use_query_cache = true, query_cache_compress_entries = false;
|
||||
|
||||
-- Run again to check that no bad things happen and that the result is as expected
|
||||
SELECT '-- read from cache';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS use_query_cache = true;
|
||||
|
||||
DROP TABLE t;
|
@ -1,2 +0,0 @@
|
||||
1
|
||||
1
|
@ -1,12 +0,0 @@
|
||||
-- Tags: no-parallel
|
||||
-- Tag no-parallel: Messes with internal cache
|
||||
|
||||
SET allow_experimental_query_cache = true;
|
||||
|
||||
SYSTEM DROP QUERY CACHE;
|
||||
|
||||
-- Run query and store result in query cache but without compression which is on by default
|
||||
SELECT 1 SETTINGS use_query_cache = true, query_cache_compress_entries = false;
|
||||
|
||||
-- Run again to check that no bad things happen and that the result is as expected
|
||||
SELECT 1 SETTINGS use_query_cache = true;
|
@ -1,3 +1,4 @@
|
||||
-- insert with enabled squashing
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
@ -66,7 +67,7 @@ jkl
|
||||
jkl
|
||||
jkl
|
||||
jkl
|
||||
-
|
||||
-- read from cache
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
@ -135,7 +136,7 @@ jkl
|
||||
jkl
|
||||
jkl
|
||||
jkl
|
||||
--------------------
|
||||
-- insert with disabled squashing
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
@ -204,7 +205,7 @@ jkl
|
||||
jkl
|
||||
jkl
|
||||
jkl
|
||||
-
|
||||
-- read from cache
|
||||
abc
|
||||
abc
|
||||
abc
|
||||
|
@ -9,6 +9,7 @@ DROP TABLE IF EXISTS t;
|
||||
|
||||
-- Create test table with "many" rows
|
||||
CREATE TABLE t(c String) ENGINE=MergeTree ORDER BY c;
|
||||
SYSTEM STOP MERGES t; -- retain multiple parts to make the SELECT process multiple chunks
|
||||
INSERT INTO t values ('abc') ('def') ('ghi') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('ghi') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('ghi') ('jkl');
|
||||
@ -28,21 +29,25 @@ INSERT INTO t values ('abc') ('def') ('ghi') ('jkl');
|
||||
INSERT INTO t values ('abc') ('def') ('ghi') ('jkl');
|
||||
|
||||
-- Run query which reads multiple chunks (small max_block_size), cache result in query cache, force squashing of partial results
|
||||
SELECT * FROM t ORDER BY c SETTINGS max_block_size = 2, use_query_cache = true, query_cache_squash_partial_results = true;
|
||||
|
||||
SELECT '-';
|
||||
SELECT '-- insert with enabled squashing';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS max_block_size = 2, use_query_cache = true, query_cache_squash_partial_results = true;
|
||||
|
||||
-- Run again to check that no bad things happen and that the result is as expected
|
||||
SELECT * FROM t ORDER BY c SETTINGS max_block_size = 2, use_query_cache = true;
|
||||
SELECT '-- read from cache';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS max_block_size = 2, use_query_cache = true;
|
||||
|
||||
SELECT '--------------------';
|
||||
SYSTEM DROP QUERY CACHE;
|
||||
|
||||
-- Run query which reads multiple chunks (small max_block_size), cache result in query cache, but **disable** squashing of partial results
|
||||
SELECT * FROM t ORDER BY c SETTINGS max_block_size = 2, use_query_cache = true, query_cache_squash_partial_results = false;
|
||||
|
||||
SELECT '-';
|
||||
SELECT '-- insert with disabled squashing';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS max_block_size = 2, use_query_cache = true, query_cache_squash_partial_results = false;
|
||||
|
||||
-- Run again to check that no bad things happen and that the result is as expected
|
||||
SELECT * FROM t ORDER BY c SETTINGS max_block_size = 2, use_query_cache = true;
|
||||
SELECT '-- read from cache';
|
||||
SELECT * FROM t ORDER BY c
|
||||
SETTINGS max_block_size = 2, use_query_cache = true;
|
||||
|
||||
DROP TABLE t;
|
||||
|
Loading…
Reference in New Issue
Block a user