mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::db: Add table block_size setting to column descriptor.
This commit is contained in:
parent
a4f8cf83f6
commit
176e70d2c7
2 changed files with 10 additions and 0 deletions
|
@ -53,4 +53,11 @@ struct ircd::db::database::descriptor
|
||||||
/// were first found from values in another column, where if the first
|
/// were first found from values in another column, where if the first
|
||||||
/// column missed there'd be no reason to query this column.
|
/// column missed there'd be no reason to query this column.
|
||||||
bool expect_queries_hit { false };
|
bool expect_queries_hit { false };
|
||||||
|
|
||||||
|
/// Data block size for uncompressed data. Compression will make the
|
||||||
|
/// block smaller when it IO's to and from disk. Smaller blocks may be
|
||||||
|
/// more space and query overhead if values exceed this size. Larger
|
||||||
|
/// blocks will read and cache unrelated data if values are smaller
|
||||||
|
/// than this size.
|
||||||
|
size_t block_size { 512 };
|
||||||
};
|
};
|
||||||
|
|
|
@ -1430,6 +1430,9 @@ ircd::db::database::column::column(database *const &d,
|
||||||
// Table options
|
// Table options
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Setup the block size
|
||||||
|
table_opts.block_size = this->descriptor.block_size;
|
||||||
|
|
||||||
// Setup the cache for assets.
|
// Setup the cache for assets.
|
||||||
const auto &cache_size(this->descriptor.cache_size);
|
const auto &cache_size(this->descriptor.cache_size);
|
||||||
if(cache_size != 0)
|
if(cache_size != 0)
|
||||||
|
|
Loading…
Reference in a new issue