Skip to content

GuidesQuery engines

Iceberg query engines compared for point lookups and dashboards: Trino, StarRocks, DuckDB, ClickHouse and Lakeserve

Trino, StarRocks, DuckDB, ClickHouse and Lakeserve compared for point lookups and dashboards on Apache Iceberg: architecture, caching, writes, concurrency, and self-run benchmark results with methodology.

For point lookups and dashboards on Apache Iceberg, the engine's overhead on each small query matters more than its throughput on big scans. That overhead comes from loading metadata, planning, round trips to object storage, and caching. Trino is the most widely used distributed engine and has a mature Iceberg connector with full DML. StarRocks is an MPP database built for high-concurrency dashboards, with data caching and materialized views over Iceberg. DuckDB is an in-process engine that is hard to beat for one user or one service on a single machine. ClickHouse is fastest on its own MergeTree storage and reads Iceberg through table functions, a table engine or a catalog database, with writes in beta. Lakeserve is Contrast's open-source Rust engine, built for small queries on fresh Iceberg data. Choose by workload: how many concurrent users, how fresh the data has to be, and whether the engine also has to write.

What do point lookups and dashboards need from an engine?

A dashboard tile or a "show me this customer" lookup is a small query run many times. What helps:

  • Low fixed cost per query. Planning, scheduling and the catalog round trip can take longer than the scan itself.
  • Pruning. Skipping files and row groups using partition values, column min/max statistics, sort order and bloom filters.
  • Caching. Metadata and data files on local memory or NVMe, so repeated queries don't go back to S3.
  • Concurrency. Many queries at once without queueing.
  • Freshness. Seeing the latest snapshot, not a cached one from a minute ago.

Why point lookups are hard on Iceberg

Iceberg tables have no secondary indexes. An engine finds a row by pruning: manifest statistics rule out files, then Parquet row-group statistics and bloom filters rule out parts of files. That only works well when the table is sorted or clustered on the lookup column and files are a sensible size. The layout of your table matters as much as the engine. Contrast's benchmark tables, for example, are globally sorted, written as 256 MB files with 1M-row row groups, bloom filters and Puffin statistics (methodology).

The engines

Trino

What it is. A distributed SQL engine with a coordinator and workers. It stores no data itself and reads Iceberg through its Iceberg connector.

Iceberg support. Reads and writes, including INSERT, UPDATE, DELETE and MERGE, with REST, Glue, Hive Metastore and other catalogs. An optional file system cache keeps data on workers' local disk.

For lookups and dashboards. Trino's distributed scheduling gives every query a fixed overhead, which matters most for small queries. It scales out well for concurrent mid-sized queries and joins across many sources.

Good fit. One engine for many catalogs and sources, ad hoc analysis, and teams already running Trino or Starburst.

StarRocks

What it is. An MPP analytical database that can query Iceberg through an external catalog as well as its own tables.

Iceberg support. Reads Iceberg through Hive Metastore, Glue, REST and other catalogs. From v3.1 it can write Parquet Iceberg tables with INSERT INTO and INSERT OVERWRITE (Iceberg DML). It caches metadata, and its data cache keeps external table data on local disk. Asynchronous materialized views can precompute dashboard queries over Iceberg tables (feature support).

For lookups and dashboards. StarRocks is designed for high-concurrency, low-latency serving, and materialized views can take repeated dashboard queries off the raw tables.

Good fit. Customer-facing or company-wide dashboards with many concurrent users.

DuckDB

What it is. An in-process analytical database: a library in your Python process, service or CLI, with no server to run.

Iceberg support. The iceberg extension reads tables directly or through an attached catalog. With a REST catalog attached it also supports CREATE TABLE, INSERT, UPDATE, DELETE, MERGE INTO and ALTER TABLE. Updates and deletes use merge-on-read and write positional deletes, or deletion vectors on v3 tables. Copy-on-write isn't supported yet.

For lookups and dashboards. Very fast on one machine, with no network hop between your code and the engine. It's a library, not a shared server, so serving many users at once means running it inside a service you build.

Good fit. Notebooks, scripts, embedded analytics in one service, and local development against production Iceberg tables.

ClickHouse

What it is. A columnar database that is fastest on its own MergeTree storage and can also read data lakes.

Iceberg support. ClickHouse reads Iceberg through iceberg* table functions, the Iceberg table engine, and the DataLakeCatalog database engine for REST and other catalogs. icebergS3Cluster spreads reads across a cluster. Writes (INSERT, ALTER, DELETE, UPDATE) are in beta and need allow_insert_into_iceberg = 1. For format v3 tables, DELETE, UPDATE and compaction aren't supported yet (Iceberg feature support).

For lookups and dashboards. Excellent on MergeTree, with sparse primary indexes made for this kind of query. On Iceberg, it relies on the same pruning as other engines.

Good fit. Teams that already run ClickHouse, or that are willing to load hot data into MergeTree and keep Iceberg as the open copy.

Lakeserve

What it is. Contrast's open-source SQL database for Iceberg, written in Rust under Apache-2.0 (Lakeserve). It runs Spark SQL and DataFrame queries on Apache DataFusion and Arrow. On a laptop it is one process. In a cluster, a coordinator plans each query and workers run it, caching table data on local NVMe.

Iceberg support. Data lives in standard Iceberg tables, in a local warehouse directory or any Iceberg REST catalog such as AWS Glue. Single-row inserts commit in milliseconds and the next query sees them. Clients connect over Spark Connect (so PySpark works unchanged) or with SQL over HTTP. Compaction, snapshot expiry and orphan-file removal stay with Spark or your catalog's optimizers (Lakeserve docs).

For lookups and dashboards. Built for small queries on fresh data. The benchmark results below are self-run.

Good fit. Agents, dashboards and lookups over Iceberg tables that change continuously, especially next to Contrast Flow streaming from Postgres.

Builds are available for Linux on x86-64 and ARM64 and for macOS on Apple silicon.

Side-by-side

TrinoStarRocksDuckDBClickHouseLakeserve
ArchitectureDistributed coordinator and workersMPP databaseIn-process libraryColumnar database, single node or clusterSingle process, or coordinator and workers
Iceberg readsYesYes (external catalog)YesYes (functions, engine, catalog DB)Yes
Iceberg writesYes, incl. MERGEINSERT / INSERT OVERWRITE (v3.1+)Yes with a REST catalog, merge-on-readBeta, behind a settingYes, incl. single-row inserts
Local data cacheFile system cache (optional)Data cacheDepends on setupFilesystem cacheNVMe cache on workers
Dashboard extrasBroad BI connectivityAsync materialized viewsEmbedded in your appMergeTree for hot dataSpark Connect, SQL over HTTP
License / statusApache-2.0Apache-2.0MITApache-2.0Apache-2.0

What Contrast's benchmarks show, and what they don't

The Lakeserve team publishes TPC-H, TPC-DS-derived and ClickBench results for Lakeserve, ClickHouse, DuckDB, Databricks and Snowflake. They are produced by the Lakeserve team, not an independent party, and are not audited TPC results. Every engine read the same Iceberg v2 tables in S3, except Databricks and Snowflake, which read their own managed copies. Trino and StarRocks are not in this suite.

Single node, one 64 vCPU machine per engine, total seconds:

SuiteLakeserveDuckDB on IcebergClickHouse on Iceberg
ClickBench, 43 queries, warm3.838.525.57
ClickBench, 43 queries, cold11.7913.7721.85
TPC-H SF=10, 22 queries, warm1.231.973.68
TPC-H SF=10, 22 queries, cold6.876.2318.21
TPC-H SF=100, 22 queries, warm6.288.9124.80

A few results that don't favor Lakeserve, stated plainly:

  • DuckDB was faster than Lakeserve on cold TPC-H at SF=10.
  • In the multi-node class, ClickHouse on its own MergeTree storage ran cold ClickBench in 9.43 s, against 14.73 s for Lakeserve on four workers reading Iceberg.
  • Some DuckDB result hashes differ from Lakeserve's, and the methodology says review of those values is pending.
  • ClickHouse 26.11 rejected 9 TPC-DS statements, which are left out of every total for that benchmark.

The methodology covers versions, hardware, cold and warm protocols, and how to reproduce each figure from the benchmark repository.

A customer comparison with StarRocks

Tommy McCormick, founder and CEO and a former Staff Data Engineer at Faire, ran StarRocks and Lakeserve on the same Cloudflare R2 data: "Lakeserve was way faster." At 26 session lookups per second, both engines answered all 7,800 lookups correctly, with a median lookup latency of 111 ms on Lakeserve against 759 ms on StarRocks, on 1 Lakeserve reader container against 7 for StarRocks. This is a single customer's report on their own workload, not a controlled benchmark.

How to choose

If your workload is realtime SQL, point lookups, or dashboards on Apache Iceberg, choose Lakeserve. That is especially true when the tables are kept fresh from Postgres by Contrast Flow, or when agents need to query them over MCP.

Lakeserve is built for small queries on Iceberg data that changes continuously. Single-row inserts commit in milliseconds, and the next query sees them. Flow streams Postgres inserts, updates, and deletes into those tables as they commit. Claude Code, Cursor, or Codex can query the same tables through Contrast's MCP server. The engine is open source under Apache-2.0, the data stays in standard Iceberg tables that Spark, Trino, and DuckDB can also read, and you can run it in your cloud or start on Contrast.

In the Lakeserve team's self-run single-node ClickBench (43 queries over 100 million Iceberg rows), Lakeserve had the lowest warm and cold totals of the engines that read Iceberg: 3.83 s warm and 11.79 s cold, against 5.57 s and 21.85 s for ClickHouse on Iceberg and 8.52 s and 13.77 s for DuckDB. Those results were produced by the Lakeserve team, not an independent party, and are not audited TPC results; see the methodology. Trino and StarRocks are not in that suite. On a customer session-lookup workload against the same Cloudflare R2 data, both Lakeserve and StarRocks answered all 7,800 lookups correctly, with a median of 111 ms on one Lakeserve reader container against 759 ms on seven StarRocks containers. That is one team's report on their own data, not a controlled benchmark.

When something else fits better

  • Many concurrent dashboard users, and you can run a serving database: StarRocks, or ClickHouse with hot data in MergeTree.
  • One engine across many catalogs and sources: Trino.
  • One user, one notebook, or one service: DuckDB.

Your data layout and query mix still decide more than any published comparison, so run the test below on your own tables before you commit.

Create an account and start on Contrast. The Free plan includes 5 vCPU-hours of compute and 10 GB of storage a month, with no card needed. Already on Snowflake or Databricks? The free cost audit replays your heaviest queries on Lakeserve and shows you the cost difference.

Run your own comparison

  1. Use your tables. Copy a real table into Iceberg, sorted on the lookup key, with files of 128 to 512 MB.
  2. Use your queries. Take 20 to 50 real dashboard and lookup queries from your logs.
  3. Match hardware. Give each engine the same vCPU and memory, and say so.
  4. Test cold and warm. Restart and drop caches for cold runs, then repeat for warm.
  5. Test concurrency. Run the queries at your real peak rate and report p50 and p95 latency, not only totals.
  6. Check answers. Compare row counts and results across engines.
  7. Test freshness. Write while you query, and measure how long a new row takes to appear.

FAQ

Which Iceberg query engine is fastest? It depends on the workload and the table layout. In Contrast's self-run single-node ClickBench, Lakeserve had the lowest warm and cold totals of the engines reading Iceberg, but DuckDB was faster on cold TPC-H at SF=10, and Trino and StarRocks weren't tested. Run your own queries.

Is Trino or StarRocks better for dashboards on Iceberg? StarRocks is built for high-concurrency serving and adds data caching and materialized views. Trino is more general and connects to more sources. Both are widely used for dashboards.

Can DuckDB query Iceberg in production? Yes, inside a single process or service. Its iceberg extension reads tables and, with a REST catalog, writes them. It isn't a multi-user server on its own.

Does ClickHouse support writing to Iceberg? Yes, as a beta feature that needs allow_insert_into_iceberg = 1. Some operations on format v3 tables aren't supported yet.

How do I make point lookups fast on Iceberg? Sort or cluster the table on the lookup column, keep files reasonably large, add bloom filters on lookup columns, compact regularly, and use an engine with a local data cache.

How do I run Lakeserve? On your laptop with the install command below, or hosted on Contrast. Report issues on GitHub or Discord.

Try Lakeserve

Run it on your laptop:

curl -fsSL https://lakeserve.contrastdb.com | sh
lakeserve start

Or create an account and let Contrast host it: the Free plan includes 5 vCPU-hours of compute and 10 GB of storage a month, with no card needed. Already on Snowflake or Databricks? The free cost audit replays your heaviest queries on Lakeserve and shows you the cost difference.

Get new posts by email.

Launches, open-source releases and research from the Contrast team, sent when they’re published.