2024-04-19 06:30:16 +00:00
|
|
|
-- Tags: no-parallel
|
2024-04-17 17:06:33 +00:00
|
|
|
DROP TABLE IF EXISTS test;
|
|
|
|
DROP TABLE IF EXISTS test2;
|
2024-04-19 06:30:16 +00:00
|
|
|
|
|
|
|
CREATE TABLE test (s String) ENGINE = MergeTree ORDER BY s SETTINGS index_granularity = 1;
|
2024-04-17 17:06:33 +00:00
|
|
|
CREATE TABLE test2 (s String) ENGINE = MergeTree ORDER BY s SETTINGS index_granularity = 1;
|
|
|
|
|
2024-04-19 06:30:16 +00:00
|
|
|
INSERT INTO test SELECT randomString(1000) FROM numbers(100000);
|
2024-04-17 17:06:33 +00:00
|
|
|
INSERT INTO test2 SELECT randomString(1000) FROM numbers(100000);
|
|
|
|
|
2024-04-19 06:10:20 +00:00
|
|
|
SELECT round(primary_key_bytes_in_memory, -7), round(primary_key_bytes_in_memory_allocated, -7) FROM system.parts WHERE database = currentDatabase() AND table IN ('test', 'test2');
|
2024-04-17 17:06:33 +00:00
|
|
|
|
|
|
|
SYSTEM UNLOAD PRIMARY KEY;
|
|
|
|
|
2024-04-19 06:30:16 +00:00
|
|
|
SELECT primary_key_bytes_in_memory, primary_key_bytes_in_memory_allocated FROM system.parts WHERE database = currentDatabase() AND table IN ('test', 'test2')
|