Query Engines for Lakehouses (Trino / Presto, StarRocks, ClickHouse, Dremio)
Query open tables with engines optimized for federated SQL, real-time OLAP, or lake acceleration.
In plain words
Federation, latency, concurrency, and mutation. Next, table/catalog compatibility and pushdown. Finally, cold/warm p95, correctness, refresh, and cost.
Think of it like…
These engines are specialized vehicles on the same open road: a pickup joins sources, a sports car serves dashboards, and a cached shuttle repeats popular routes, each with different fuel and road limits.
Where you’ve seen it
Trino queries Iceberg plus Postgres for an analyst join, StarRocks serves subsecond high-concurrency dashboards after ingest, ClickHouse materializes sorted event aggregates, and Dremio reflections accelerate S3 SQL behind a governed semantic view.
Words you’ll hear
- Trino
- An MPP federated coordinator/worker SQL engine optimized for interactive queries across catalogs and data sources.
- StarRocks
- An MPP real-time analytical database oriented toward high-concurrency dashboards and low-latency ingestion.
- ClickHouse
- A columnar OLAP engine with MergeTree-family storage, ordering, materialized views, and aggressive vectorized execution.
- Operational boundary
- A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations. Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation.
Visual diagram
Theory & deep dive
Trino: the working mechanism
Trino/Presto favor distributed federated SQL, StarRocks targets low-latency analytics, ClickHouse is a fast columnar OLAP engine, and Dremio accelerates lake queries with a semantic/reflection layer.
Federation, latency, concurrency, and mutation. Table/catalog compatibility and pushdown, then joins, ingestion, cache, and sort/distribution; this exposes the state governed by ClickHouse.
Trino queries Iceberg plus Postgres for an analyst join, StarRocks serves subsecond high-concurrency dashboards after ingest, ClickHouse materializes sorted event aggregates, and Dremio reflections accelerate S3 SQL behind a governed semantic view.
Query Engines for Lakehouses: failure mode and production response
A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation. Track Cold p95 as "metadata/object-scan latency without warm acceleration", and make Concurrency visible to the dataset owner.
How it works, step by step
Step 1 of 41. Profile request
Federation, latency, concurrency, and mutation. Trino/Presto favor distributed federated SQL, StarRocks targets low-latency analytics, ClickHouse is a fast columnar OLAP engine, and Dremio accelerates lake queries with a semantic/reflection layer.
- Cold p95
- metadata/object-scan latency without warm acceleration
- StarRocks
- An MPP real-time analytical database oriented toward high-concurrency dashboards and low-latency ingestion.
When to use it & trade-offs
What it is
Trino/Presto favor distributed federated SQL, StarRocks targets low-latency analytics, ClickHouse is a fast columnar OLAP engine, and Dremio accelerates lake queries with a semantic/reflection layer. Trino queries Iceberg plus Postgres for an analyst join, StarRocks serves subsecond high-concurrency dashboards after ingest, ClickHouse materializes sorted event aggregates, and Dremio reflections accelerate S3 SQL behind a governed semantic view.
Why it matters: A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations. Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation.
When to reach for it
- Query open tables with engines optimized for federated SQL, real-time OLAP, or lake acceleration.
- Choose Trino because it provides this capability: An MPP federated coordinator/worker SQL engine optimized for interactive queries across catalogs and data sources.
- Keep evidence for Cold p95 at "metadata/object-scan latency without warm acceleration" so the last production stage-Validate - cold/warm p95, correctness, refresh, and cost-remains testable.
When to avoid or be careful
- A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
- Do not conflate StarRocks with Trino. The second concept contributes different behavior: An MPP real-time analytical database oriented toward high-concurrency dashboards and low-latency ingestion.
- Release only after this guardrail is in place: Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation.
Trino / StarRocks / ClickHouse - roles, limits, and operating cost
Strengths: An MPP federated coordinator/worker SQL engine optimized for interactive queries across catalogs and data sources. Trino/Presto favor distributed federated SQL, StarRocks targets low-latency analytics, ClickHouse is a fast columnar OLAP engine, and Dremio accelerates lake queries with a semantic/reflection layer.
Watch out: A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
Strengths: An MPP real-time analytical database oriented toward high-concurrency dashboards and low-latency ingestion. In this workflow it supports: Plan compute - joins, ingestion, cache, and sort/distribution.
Watch out: The operating cost is real: queries that meet SLO before queue or memory pressure.
Strengths: A columnar OLAP engine with MergeTree-family storage, ordering, materialized views, and aggressive vectorized execution. Its output can be checked with Pushdown.
Watch out: Operating guardrail: Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for Trino, and how would Cold p95 reveal it?”
- “Why is StarRocks distinct from this behavior: a columnar OLAP engine with MergeTree-family storage, ordering, materialized views, and aggressive vectorized execution?”
- Production clue: A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
- Design probe: Choose engines by latency, concurrency, source federation, ingestion, update semantics, and table-format metadata support; benchmark representative file sizes and pushdown, and document data ownership and caching invalidation.
Benchmarks & rules of thumb
- Cold p95
- metadata/object-scan latency without warm acceleration
- Concurrency
- queries that meet SLO before queue or memory pressure
- Pushdown
- partition, projection, filter, and aggregate work completed near storage
Common mistakes & follow-ups
Common interview mistakes
- A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
- Reporting success from a job exit code without checking Cold p95 and Concurrency.
- Treating this example as complete without replay, rollback, or access boundaries: Trino queries Iceberg plus Postgres for an analyst join, StarRocks serves subsecond high-concurrency dashboards after ingest, ClickHouse materializes sorted event aggregates, and Dremio reflections accelerate S3 SQL behind a governed semantic view.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: An MPP federated coordinator/worker SQL engine optimized for interactive queries across catalogs and data sources.
- What does the recovery plan do when this occurs? A federated JOIN pushes a huge cross-source exchange, ClickHouse import and primary/sort key choices are workload-specific, and an acceleration layer's stale reflection can violate freshness expectations.
- When is Trino insufficient for Concurrency, and what does adding StarRocks cost in Cold p95?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Query Engines for Lakehouses (Trino / Presto, StarRocks, ClickHouse, Dremio) with data engineer interview Q&A and hands-on practice.