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

10 lines
384 B
MySQL
Raw Normal View History

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