Elastic Content Share

ES|QL performance tips for faster Kibana and Elasticsearch queries

Make ES|QL queries faster and easier to support by filtering early, keeping fewer columns, limiting rows, and avoiding broad unfiltered searches.

When an ES|QL query feels slow or returns too much data, the fix is often in the shape of the pipeline. Filter early, keep only useful columns, sort only when you need deterministic order, and limit the rows returned to Kibana or the API.

FROM logs-*
| WHERE @timestamp >= NOW() - 15 minutes
| WHERE service.name == "checkout"
| KEEP @timestamp, service.name, log.level, message, trace.id
| SORT @timestamp DESC
| LIMIT 100

Why this ES|QL pattern helps

Every ES|QL pipe receives the table produced by the previous step. The earlier you reduce rows and columns, the less work later steps usually need to do. This matters most for broad index patterns, high-cardinality fields, joins, parsing, and dashboards that refresh often.

Practical performance tips

When to use it

This checklist fits Kibana ES|QL support cases, dashboard tuning, alert query review, and Elasticsearch users who are moving from raw document searches to pipeline-style analysis.

Source reference: Elastic documentation: Optimize ES|QL query performance.