ClickHouse/tests/queries/1_stateful/00061_storage_buffer.sql

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

17 lines
567 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS test.hits_dst;
DROP TABLE IF EXISTS test.hits_buffer;
CREATE TABLE test.hits_dst AS test.hits;
2023-08-03 11:46:57 +00:00
CREATE TABLE test.hits_buffer AS test.hits_dst ENGINE = Buffer(test, hits_dst, 8, 600, 600, 1000000, 1000000, 100000000, 1000000000);
INSERT INTO test.hits_buffer SELECT * FROM test.hits WHERE CounterID = 800784;
SELECT count() FROM test.hits_buffer;
SELECT count() FROM test.hits_dst;
OPTIMIZE TABLE test.hits_buffer;
SELECT count() FROM test.hits_buffer;
SELECT count() FROM test.hits_dst;
DROP TABLE test.hits_dst;
DROP TABLE test.hits_buffer;