ClickHouse/tests/queries/0_stateless/00899_long_attach_memory_limit.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

10 lines
383 B
SQL

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 5000000;
SELECT count() FROM index_memory;
DETACH TABLE index_memory;
SET max_memory_usage = 39000000;
ATTACH TABLE index_memory;
SELECT count() FROM index_memory;
DROP TABLE index_memory;