On Dashboards context, many widgets issue individual queries to Elasticsearch.
In the majority of real world use-cases, some of these queries will share the same root aggregations. e.g. a Date histogram over identical time-ranges. It is more efficient (less network traffic, less ES load) to issue a single query that returns the same data as issuing multiple queries.
Goal
(1) Investigate "automagic" consolidation of queries.
(2) Rather than having Kibana do this consolidation ad-hoc, consider if more explicit data modeling by the user may achieve the same effect.
e.g. multiple charts reading different data from different columns in the same ES|QL statement.
This relies on the assumption that a single ES-query with two metrics (e.g. | stats foo, bar would be more efficient than two queries with two separate (e.g. | stats foo ... and | stats bar ...).
On Dashboards context, many widgets issue individual queries to Elasticsearch.
In the majority of real world use-cases, some of these queries will share the same root aggregations. e.g. a Date histogram over identical time-ranges. It is more efficient (less network traffic, less ES load) to issue a single query that returns the same data as issuing multiple queries.
Goal
(1) Investigate "automagic" consolidation of queries.
There is a tight overlap here with https://github.com/elastic/kibana/issues/166206, as this would rely on a client-side consolidation layer.
(2) Rather than having Kibana do this consolidation ad-hoc, consider if more explicit data modeling by the user may achieve the same effect.
e.g. multiple charts reading different data from different columns in the same ES|QL statement.
This relies on the assumption that a single ES-query with two metrics (e.g.
| stats foo, bar
would be more efficient than two queries with two separate (e.g.| stats foo ...
and| stats bar ...
).