v.21.4Improvements
Add optimize_skip_unused_shards_limit Setting to Limit Sharding Key Values
Add settingoptimize_skip_unused_shards_limitto limit the number of sharding key values foroptimize_skip_unused_shards. #21512 (Azat Khuzhin).
Why it matters
This feature addresses the problem of excessive consideration of sharding key values during query optimization, which can impact performance. By limiting the number of sharding key values, it improves efficiency and optimizes query execution on sharded tables.How to use it
Users can enable this feature by setting the parameteroptimize_skip_unused_shards_limit to a desired integer value representing the maximum number of sharding key values to evaluate. This works in conjunction with the optimize_skip_unused_shards setting.