- Notifications
You must be signed in to change notification settings - Fork 25.6k
Open
Labels
:Analytics/ES|QLAKA ESQLAKA ESQLenhancement"" muted="" aria-describedby="MDU6TGFiZWwyMzE3NA==-tooltip :R5b96b:">>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
Description
Description
Blindly contacting nodes and shards to run a plan or query (even if cheap) has a detrimental effect especially in large clusters due to the associated cost:
- nodes might be busy and have limited threads
- the shards might be frozen and contacting them is expensive
- the shard might be idle (and with refresh pending).
ES has several optimizations in this area, some which are straight forward.
This meta ticket lists a number of options with the plan of incorporating them in ESQL:
-
@timestampfilter
Determine if there's any filter in a query that works on@timestamp. This could/should be combined with thefilterparameter, if present ESQL: Improve detection of @timestamp inside query #99146 -
can_matchquery
Before executing an actual local query, check if the plan actually matches anything.- fold plan for missing fields
- force query rewrite of pushed query. See for example Skip shards when querying constant keyword fields #96161
- reduce field_caps search space - QL: EQL and ESQL to use only the necessary fields in the internal field_caps calls #98987
Currently QL asks all fields from an index pattern and does NOT apply any specifiedfilterin order to get a full view of the data. This makes validation simple and has some nice side-effects (such asdid you meanin case of typos). The big downside however is in the response time and how expensive field caps is.
To improve both latency and memory consumption, we need to find a better approach with several options on the table:
~ pre-analyze the plan and find the fields needed by it and askfields_capsjust for these (complexity: medium)
~ stop usingfield_caps(complexity: big)
~ improve performance of field caps (complexity: minimal - nothing we need to do)
Metadata
Metadata
Assignees
Labels
:Analytics/ES|QLAKA ESQLAKA ESQLenhancement"" muted="" aria-describedby="MDU6TGFiZWwyMzE3NA==-tooltip :Ra5pmb:">>enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)