mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Perf test for read after deleting many rows
This commit is contained in:
parent
614cb9a87f
commit
f31788ed2a
36
tests/performance/lightweight_delete.xml
Normal file
36
tests/performance/lightweight_delete.xml
Normal 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 < 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>
|
Loading…
Reference in New Issue
Block a user