mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Merge pull request #3504 from yandex/merge_big_parts_using_direct_io
Enable merge with DIRECT_IO when summary size of participating parts more than 10GB
This commit is contained in:
commit
237186056a
@ -149,7 +149,7 @@ struct MergeTreeSettings
|
||||
M(SettingUInt64, finished_mutations_to_keep, 100) \
|
||||
\
|
||||
/** Minimal amount of bytes to enable O_DIRECT in merge (0 - disabled) */ \
|
||||
M(SettingUInt64, min_merge_bytes_to_use_direct_io, 0)
|
||||
M(SettingUInt64, min_merge_bytes_to_use_direct_io, 10ULL * 1024 * 1024 * 1024)
|
||||
|
||||
/// Settings that should not change after the creation of a table.
|
||||
#define APPLY_FOR_IMMUTABLE_MERGE_TREE_SETTINGS(M) \
|
||||
|
@ -0,0 +1,3 @@
|
||||
2018-10-31 05:05:00 0
|
||||
2018-10-31 06:06:00 10
|
||||
2018-10-28 10:00:00 20
|
@ -0,0 +1,11 @@
|
||||
DROP TABLE IF EXISTS test.sample_merge_tree;
|
||||
|
||||
CREATE TABLE test.sample_merge_tree (dt DateTime, x UInt64) ENGINE = MergeTree PARTITION BY toYYYYMMDD(dt) ORDER BY x SETTINGS min_merge_bytes_to_use_direct_io=1, index_granularity = 8192;
|
||||
|
||||
INSERT INTO test.sample_merge_tree VALUES (toDateTime('2018-10-31 05:05:00'), 0), (toDateTime('2018-10-31 06:06:00'), 10), (toDateTime('2018-10-28 10:00:00'), 20);
|
||||
|
||||
OPTIMIZE TABLE test.sample_merge_tree FINAL;
|
||||
|
||||
SELECT * FROM test.sample_merge_tree ORDER BY x;
|
||||
|
||||
DROP TABLE IF EXISTS test.sample_merge_tree;
|
Loading…
Reference in New Issue
Block a user