ClickHouse/dbms/tests/queries/0_stateless/00899_long_attach_memory_limit.sql

10 lines
424 B
MySQL
Raw Normal View History

2019-02-14 13:42:26 +00:00
DROP TABLE IF EXISTS test.index_memory;
CREATE TABLE test.index_memory (x UInt64) ENGINE = MergeTree ORDER BY x SETTINGS index_granularity = 1;
INSERT INTO test.index_memory SELECT * FROM system.numbers LIMIT 10000000;
SELECT count() FROM test.index_memory;
DETACH TABLE test.index_memory;
SET max_memory_usage = 79000000;
ATTACH TABLE test.index_memory;
SELECT count() FROM test.index_memory;
DROP TABLE test.index_memory;