pika icon indicating copy to clipboard operation
pika copied to clipboard

设置完全禁用bloom filter的参数

Open chejinge opened this issue 3 months ago • 1 comments

Which PikiwiDB functionalities are relevant/related to the feature request?

No response

Description

禁用也非常简单,设置为nullptr就行。 //table_ops.filter_policy.reset(rocksdb::NewBloomFilterPolicy(10, true)); table_ops.filter_policy = nullptr;

Proposed solution

optimize_filters_for_hits=true ,这个吧,设为true就不缓存最后一层。有的设置是只对新生成的sst生效,table_ops.filter_policy = nullptr;是即使已存在sst即使有bloom filter,也不会加载进内存

Alternatives considered

table_options.filter_policy.reset(rocksdb::NewBloomFilterPolicy(0));

这样的话,新的sst没有bloom filter,老的sst的bloom filter还会加载进内存

因为大部分的业务,都是查的已经存在的key,这样的话bloom filter是没啥用的,只会占内存。可以用./sst_dump --file=./strings --show_properties 看看bloom filter和index的大小

chejinge avatar Oct 13 '25 08:10 chejinge

Bot detected the issue body's language is not English, translate it automatically.


Title: Set the parameters to completely disable bloom filter

Issues-translate-bot avatar Oct 13 '25 08:10 Issues-translate-bot