-
Notifications
You must be signed in to change notification settings - Fork 452
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
Validate that dashboard filters run efficient elasticsearch queries #5003
Comments
@jpountz It would be great to get someone from the Elasticsearch team to take a quick look at these queries. The reason I'm bringing this up is that I want to make sure that the queries built by Kibana are internally by Elasticsearch converted to efficient queries using For example there is a trip bool nesting with |
@martijnvg Could someone in your team take a quick look at this? |
I personally wouldn't use the The change I would make to this query, is to move the |
@martijnvg As the queries are generated by Lens / Kibana, we don't have control about it. Pulling in @drewdaemon : Does this fit in your area or who should we ping on the Kibana side to get this "reviewed"? @martijnvg Ideally you would work directly with Kibana on this as it will affect all users that build queries in Kibana. |
I like to mention that in case when no scoring is required, it is always better to use the |
@mattkime, @lukasolson, could one of you weigh in here? |
From the examples shown in the description of the issue, I don't see any queries that are placed in a
@martijnvg Which query are you referring to? I don't see an example given where the range query isn't inside a filter clause. |
@lukasolson I was referring to the collapsed search request at the end of the issue description. It has a range query in a must clause which could be moved to the filter clause. Regarding the range query, how are shorter periods like 15 minutes defined? Are those periods rounded and if so how? |
Ah, that makes sense. I've added that to our meta issue regarding query performance here: elastic/kibana#101041 Right now we aren't doing any rounding with the date ranges. If you select a period of "last 15 minutes" then we will convert that to an absolute time range on the browser (not send it as "now-15" or anything like that). We have an issue related to rounding here: elastic/kibana#94280 |
@lukasolson The issue elastic/kibana#101041 refers to Discover, but I assume all these optimisations would also be available to visualisations? Because that is where this issue initially comes from. @martijnvg I plan to close this issue as the goal was to get the discussion started around performance of dashboards. I expect you and the team to keep watching this and potentially pushing forward. Reason is if Elasticsearch makes improvements on the query speed but the benefits are not used in Kibana, it will not be available to Elasticsearch. |
Filtering in dashboards can happen in several places, as detailed below. This issue exists to validate that the resulting elasticsearch queries are the most efficient they can be; these queries are opaque to the user, as well as package devs, but can be inspected in the UI.
For sections 1-3 below, the query structure is the same:
For section 4, the query structure is slightly different:
2. Dashboard-level query filters
In addition, here is an example of a full request for a panel generating CPU metrics, filtered by datastream.
Show
The text was updated successfully, but these errors were encountered: