-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lens] Optimize redundant formula function aggregations #135265
Comments
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@flash1293 just to verify—this is the comprehensive list of operations that need to be optimized? |
Yes, that’s right. Technically an unfiltered count is “for free”, but I don’t see how this would simplify things. Also, we already have some special optimization for percentiles we should keep in mind. |
I believe the only formula function left to optimize is
|
Describe the feature:
When a Lens formula calls the same function more than once, it is currently translated into two identical aggregations in the request to Elasticsearch. Elasticsearch does not optimize this, instead performing the exact same work as many times as there are aggregations.
#131875 added the flexibility to use a single Elasticsearch aggregation to power multiple Lens dimensions. It also introduced an expression optimization hook on the
Operation
class. We should be able to use this groundwork to merge all redundant formula function calls into a single aggregation request to Elasticsearch. This will improve performance and lessen cluster load.Describe a specific use case for the feature:
Logistic function

The text was updated successfully, but these errors were encountered: