ClickHouse/tests/queries/0_stateless/02494_query_cache_sparse_columns.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
713 B
MySQL
Raw Normal View History

2023-04-06 15:59:13 +00:00
-- Tags: no-parallel
DROP TABLE IF EXISTS t_cache_sparse;
SYSTEM DROP QUERY CACHE;
CREATE TABLE t_cache_sparse (id UInt64, v UInt64)
ENGINE = MergeTree ORDER BY id
SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9;
SYSTEM STOP MERGES t_cache_sparse;
INSERT INTO t_cache_sparse SELECT number, number FROM numbers(10000);
INSERT INTO t_cache_sparse SELECT number, 0 FROM numbers(10000);
SET max_threads = 1;
2024-04-07 17:12:52 +00:00
SELECT v FROM t_cache_sparse SETTINGS use_query_cache = 1, max_threads = 1 FORMAT Null;
SELECT v FROM t_cache_sparse SETTINGS use_query_cache = 1, max_threads = 1 FORMAT Null;
2023-04-06 15:59:13 +00:00
SELECT count() FROM system.query_cache WHERE query LIKE 'SELECT v FROM t_cache_sparse%';
DROP TABLE t_cache_sparse;