Perf test for read after deleting many rows

This commit is contained in:
Alexander Gololobov 2022-07-18 16:04:07 +02:00
parent 614cb9a87f
commit f31788ed2a

View File

@ -0,0 +1,36 @@
<test>
<create_query>
CREATE TABLE lwd_test (
id UInt64,
value String,
) ENGINE=MergeTree() ORDER BY id;
</create_query>
<!-- Fill the table with relatively big values -->
<fill_query>
INSERT INTO lwd_test SELECT number, randomString(100) FROM system.numbers LIMIT 10000000;
</fill_query>
<fill_query>
OPTIMIZE TABLE lwd_test FINAL;
</fill_query>
<settings>
<max_threads>1</max_threads>
<mutations_sync>1</mutations_sync>
<allow_experimental_lightweight_delete>0</allow_experimental_lightweight_delete>
<allow_experimental_lightweight_delete_with_row_exists>1</allow_experimental_lightweight_delete_with_row_exists>
</settings>
<!-- delete most of the rows -->
<fill_query>
DELETE FROM lwd_test WHERE id &lt; 9999999;
</fill_query>
<!-- get the first remaining row -->
<query>SELECT id, length(value) FROM lwd_test ORDER BY id LIMIT 1</query>
<drop_query>DROP TABLE lwd_test</drop_query>
</test>