You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Push down bucket aggregation with sorting by metrics to multi-terms aggregation #4282
Remove missing_bucket and missing_order, Histogram composite aggregation can benefit from range-query rewrite and deliver performance comparable to terms aggregation. e.g.
Activity
LantaoJin commentedon Sep 11, 2025
For single bucket, it can be pushed to
penghuo commentedon Sep 15, 2025
@LantaoJin I found Composite aggregation perf could be better then Term aggregation in some case. for example, clickbench Q17,
LantaoJin commentedon Sep 16, 2025
Here is my testing results (with clearing cache before each query):
1 Terms (one group keys, total 1000 buckets): 20251 ms
2 Composite (one group keys, total 1000 buckets): 3798 ms
3 Terms (two group keys, high cardinality first, total 100 buckets): 7908 ms
4 Composite (two group keys, high cardinality first, total 100 buckets): 4456 ms
5 Multi-Terms (two group keys, high cardinality first, total 100 buckets): 66168 ms
6 Date Histogram (one group key): 4 ms
7 Date Histogram with Composite (one group key, 1000 buckets): 1984 ms
8 Date Histogram + Terms (two group keys, unlimited * 10 buckets): 5930 ms
9 Date Histogram with Composite (two group keys, 1000 buckets): 4581 ms
10 Histogram (one group key): 1499 ms
11 Histogram with Composite(one group key): 1794 ms
Summary:
LantaoJin commentedon Sep 16, 2025
Based on above conclusion, we should make the follow decision:
cc @penghuo
penghuo commentedon Sep 17, 2025
Remove missing_bucket and missing_order, Histogram composite aggregation can benefit from range-query rewrite and deliver performance comparable to terms aggregation. e.g.
FYI, https://opensearch.org/blog/transforming-bucket-aggregations-our-journey-to-100x-performance-improvement/