diff --git a/core/src/db/meta/MetaConsts.h b/core/src/db/meta/MetaConsts.h index c21a749fc8671d345b086c15d3a15dd0e4664157..0c77dc259945ebd8eb830d327444d00af098b22d 100644 --- a/core/src/db/meta/MetaConsts.h +++ b/core/src/db/meta/MetaConsts.h @@ -32,7 +32,12 @@ const size_t H_SEC = 60 * M_SEC; const size_t D_SEC = 24 * H_SEC; const size_t W_SEC = 7 * D_SEC; -const size_t BUILD_INDEX_THRESHOLD = 1000; +// This value is to ignore small raw files when building index. +// The reason is: +// 1. The performance of brute-search for small raw files could be better than small index file. +// 2. And small raw files can be merged to larger files, thus reduce fragmented files count. +// We decide the value based on a testing for small size raw/index files. +const size_t BUILD_INDEX_THRESHOLD = 5000; } // namespace meta } // namespace engine