The new ES|QL execution engine was designed with performance in mind — it operates on blocks at a time instead of per row, targets vectorization and cache locality, and embraces specialization and multi-threading. It is a separate component from the existing Elasticsearch aggregation framework with different performance characteristics.
Slide 16
Query planner ✓ Flexible distributed execution ✓ Allow multiple roundtrips ES|QL Query
Parsing
Unresolved AST
Resolved/Logical Plan
Analysis
Optimized Plan
Planning
Physical Plan
Local Replanning
Execution
Results
Slide 17
Compute engine ✓ Tabular data representation ✓ From 1 thread per shard to many ✓ Spilling to disk if needed ✓ Streaming of data across nodes
Slide 18
Vectorization “convert from a scalar implementation, which processes a single pair of operands at a time, to a vector implementation, which processes one operation on multiple pairs of operands at once. “ for (i = 0; i < n; i++) c[i] = a[i] + b[i];
https://en.wikipedia.org/wiki/Automatic_vectorization
ES|QL in action https://github.com/dadoonet/esql-demo
Slide 22
ES|QL with (Java) client
Slide 23
PROJECTIONS
Each language client will offer a selection of projections relevant to that language ecosystem.
RESULT DATA
Ways to consume ES|QL results
Users can consume raw data directly from the server output in one of several formats.
DataFrame
Object / Dict
Cursor
For mapping domain objects within a client application
For incremental consumption of results, with implicit pagination
For data science and analytics; integration with frameworks like Pandas
Text
CSV
JSON
Human-readable format ideal for interactive work, CLIs, etc
Raw CSV data to load directly into spreadsheets and ETL processes
Structured response containing metadata and data in a 2D value array
Bring your own Custom projections built atop raw server output
Apache Arrow Dataframe IPC format
Slide 24
Object API https://github.com/dadoonet/elasticsearch-java-client-demo String query = “”” FROM persons | WHERE name == “David” | KEEP name | LIMIT 1 “”“; Iterable<Person> persons = client.esql() .query(ObjectsEsqlAdapter.of(Person.class), query); for (Person person : persons) { assertNull(person.getId()); assertNotNull(person.getName()); }
Slide 25
ResultSet JDBC API https://github.com/dadoonet/elasticsearch-java-client-demo String query = “”” FROM persons | WHERE name == “David” | KEEP name | LIMIT 1 “”“; try (ResultSet resultSet = client.esql() .query(ResultSetEsqlAdapter.INSTANCE, query)) { assertTrue(resultSet.next()); assertEquals(“David”, resultSet.getString(1)); }
Slide 26
ES|QL
• Language • Engine • Visualization
Slide 27
Try it!
https://esql.demo.elastic.co
Slide 28
Elasticsearch Query Language ES|QL David Pilato - @dadoonet Developer | Evangelist