ClickHouse/dbms/Storages/MergeTree/MergeTreeIOSettings.h

40 lines
1.4 KiB
C++
Raw Normal View History

2019-10-10 16:30:30 +00:00
#pragma once
#include <cstddef>
2019-11-07 11:11:38 +00:00
#include <Core/Settings.h>
2019-10-10 16:30:30 +00:00
namespace DB
{
2019-11-07 11:11:38 +00:00
struct MergeTreeReaderSettings
2019-11-05 11:53:22 +00:00
{
size_t min_bytes_to_use_direct_io = 0;
size_t min_bytes_to_use_mmap_io = 0;
size_t max_read_buffer_size = DBMS_DEFAULT_BUFFER_SIZE;
2020-01-16 16:15:01 +00:00
/// If save_marks_in_cache is false, then, if marks are not in cache,
/// we will load them but won't save in the cache, to avoid evicting other data.
2019-11-05 11:53:22 +00:00
bool save_marks_in_cache = false;
};
struct MergeTreeWriterSettings
2019-11-05 11:53:22 +00:00
{
MergeTreeWriterSettings(const Settings & global_settings, bool can_use_adaptive_granularity_,
size_t aio_threshold_, bool blocks_are_granules_size_ = false)
2019-11-07 11:11:38 +00:00
: min_compress_block_size(global_settings.min_compress_block_size)
, max_compress_block_size(global_settings.min_compress_block_size)
, aio_threshold(aio_threshold_)
2019-11-05 11:53:22 +00:00
, can_use_adaptive_granularity(can_use_adaptive_granularity_)
, blocks_are_granules_size(blocks_are_granules_size_) {}
size_t min_compress_block_size;
size_t max_compress_block_size;
size_t aio_threshold;
bool can_use_adaptive_granularity;
bool blocks_are_granules_size;
2020-02-06 15:32:00 +00:00
/// true if we write temporary files during alter.
bool is_writing_temp_files = false;
2019-11-05 11:53:22 +00:00
size_t estimated_size = 0;
2020-02-06 15:32:00 +00:00
/// used when ALTERing columns if we know that array offsets are not altered.
bool skip_offsets = false;
2019-11-05 11:53:22 +00:00
};
2019-10-10 16:30:30 +00:00
}