---
title: "Query engines (hard)"
description: "Query planning, optimization and execution engines"
url: "https://swe.quest/tags/query-engines?difficulty=hard"
---

# Query engines (hard)

Topic in Data & databases: Query planning, optimization and execution engines

By difficulty: [Easy](https://swe.quest/tags/query-engines.md?difficulty=easy) · [Medium](https://swe.quest/tags/query-engines.md?difficulty=medium) · [Hard](https://swe.quest/tags/query-engines.md?difficulty=hard)

Posts 1–24 of 27, page 1 of 2, newest first.

## 2026-10-28

- [The new cost-based join optimizer with reordering support for non-inner joins](https://swe.quest/articles/the-new-cost-based-join-optimizer-with-reordering-support-for-non-inner-joins-60f6c88dd7c8b7a9.md): ClickHouse · 2026-10-28 · Hard · 17 min read · Query engines, Algorithms, Analytics & OLAP, Performance engineering
  ClickHouse's new cost-based join optimizer uses an exhaustive DPsub dynamic-programming enumerator over table-subset bitmasks.

## 2026-10-14

- [Sequences and other volatiles in Neki](https://swe.quest/articles/sequences-and-other-volatiles-in-neki-867c9857ecacbacb.md): PlanetScale · 2026-10-14 · Hard · 14 min read · Query engines, PostgreSQL, Distributed databases, SQL
  Neki, PlanetScale's sharded Postgres, implements Postgres sequences by classifying sequence operations like nextval() as router-only, with an authoritative shard hosting all sequences so values are never duplicated across shards.

## 2026-10-01

- [Building a faster, lazier router for Postgres](https://swe.quest/articles/building-a-faster-lazier-router-for-postgres-bc9a70ce219128ed.md): PlanetScale · 2026-10-01 · Hard · 15 min read · PostgreSQL, Distributed databases, Performance engineering, Go, Query engines
  Neki, PlanetScale's Postgres sharding router, cuts per-query overhead by keeping PostgreSQL wire-protocol bytes intact and decoding only as much as each query requires.
- [How we extended Apache DataFusion to execute one query across many machines](https://swe.quest/articles/how-we-extended-apache-datafusion-to-execute-one-query-across-many-machines-6519f2d407c939dd.md): Datadog Engineering · 2026-10-01 · Hard · 12 min read · Query engines, Distributed databases, Rust, Analytics & OLAP, Open source
  Datadog built Distributed DataFusion, an open source Rust framework that extends Apache DataFusion's physical execution model so a single interactive query can run across many machines while keeping latency roughly flat as data grows.

## 2026-09-28

- [Can your Postgres survive a bad query?](https://swe.quest/articles/can-your-postgres-survive-a-bad-query-744ea9a22b65710c.md): ClickHouse · 2026-09-28 · Hard · 13 min read · PostgreSQL, Memory management, Resilience, Query engines, Linux
  Postgres's \`work\_mem\` limits memory per plan node per process, not per query, so parallel workers and \`hash\_mem\_multiplier\` can push a simple aggregation past 8x \`work\_mem\`.

## 2026-09-24

- [Quail: Speeding up AI-SQL by jointly optimizing query planner and inference engine](https://swe.quest/articles/quail-speeding-up-ai-sql-by-jointly-optimizing-query-planner-and-inference-515cdcca6399e688.md): Modal · 2026-09-24 · Hard · 18 min read · Inference & serving, Query engines, LLMs, Performance engineering, SQL
  Quail is a query-aware inference layer that jointly optimizes AI-SQL query planning and LLM inference.

## 2026-08-11

- [What's new in pg\_clickhouse v0.10.0: Subqueries, TPC-H Speedups, C Driver, and Aggregates](https://swe.quest/articles/what-s-new-in-pg-clickhouse-v0-10-0-subqueries-tpc-h-speedups-c-driver-and-178ced76a7784be7.md): ClickHouse · 2026-08-11 · Hard · 11 min read · PostgreSQL, Query engines, Analytics & OLAP, SQL, Performance engineering
  pg\_clickhouse v0.10.0 pushes correlated scalar subqueries, IN and NOT IN down to ClickHouse as remote subqueries and anti/semi-joins, raising full TPC-H pushdown from 12 to 16 of 22 queries.

## 2026-07-07

- [Intelligence is Free, Now What? Data Systems for, of, and by Agents](https://swe.quest/articles/intelligence-is-free-now-what-data-systems-for-of-and-by-agents-98e20761c37c0c4d.md): Berkeley AI Research · 2026-07-07 · Hard · 13 min read · Databases, AI agents, Query engines, Consistency models, Formal methods
  With inference costs falling roughly 50x per year, near-free intelligence creates three research directions for data systems.

## 2026-07-02

- [How we made ClickStack 5x faster for ClickHouse observability](https://swe.quest/articles/how-we-made-clickstack-5x-faster-for-clickhouse-observability-ed934241e77977aa.md): ClickHouse · 2026-07-02 · Hard · 22 min read · Observability, Analytics & OLAP, Performance engineering, Query engines, Storage engines
  ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process.

## 2026-06-03

- [How ClickHouse became fast at joins](https://swe.quest/articles/how-clickhouse-became-fast-at-joins-68de042e0ff6c22e.md): ClickHouse · 2026-06-03 · Hard · 15 min read · Query engines, Analytics & OLAP, Performance engineering, SQL
  ClickHouse became 26× faster on the join-heavy TPC-H SF100 workload between 22.4 and 26.4.

## 2026-05-27

- [Introducing multi-stage distributed query execution in ClickHouse Cloud](https://swe.quest/articles/introducing-multi-stage-distributed-query-execution-in-clickhouse-cloud-49bf049f23a569d6.md): ClickHouse · 2026-05-27 · Hard · 14 min read · Query engines, Distributed databases, Analytics & OLAP, Performance engineering
  ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query.

## 2026-05-14

- [Postgres FDW: Pushdown is a negotiation](https://swe.quest/articles/postgres-fdw-pushdown-is-a-negotiation-623facded31963c6.md): ClickHouse · 2026-05-14 · Hard · 16 min read · PostgreSQL, Query engines, Analytics & OLAP, Performance engineering
  pg\_clickhouse, a Postgres foreign data wrapper for ClickHouse, decides clause by clause how much of a query to push down as ClickHouse SQL.

## 2026-04-21

- [Index sharding in ClickHouse Cloud: Petabyte-scale data needs petabyte-scale indexing](https://swe.quest/articles/index-sharding-in-clickhouse-cloud-petabyte-scale-data-needs-petabyte-scale-162dcf2c4093c588.md): ClickHouse · 2026-04-21 · Hard · 16 min read · Query engines, Analytics & OLAP, Distributed databases, Memory management, Performance engineering
  Index sharding in ClickHouse Cloud splits primary and secondary index analysis across replicas using consistent hashing over data parts.

## 2026-04-03

- [AI for Systems: Using LLMs to Optimize Database Query Execution](https://swe.quest/articles/ai-for-systems-using-llms-to-optimize-database-query-execution-4407ac9f4162928a.md): Together AI · 2026-04-03 · Hard · 6 min read · Query engines, LLMs, Performance engineering, Databases
  LLMs can act as semantic cardinality estimators that fix join-order mistakes in database physical plans without modifying the engine.

## 2026-03-12

- [Shopify’s journey to faster breadth-first GraphQL execution](https://swe.quest/articles/shopify-s-journey-to-faster-breadth-first-graphql-execution-83f0f58b8c4dabd1.md): Shopify Engineering · 2026-03-12 · Hard · 14 min read · GraphQL, Performance engineering, Ruby, Query engines
  Shopify built GraphQL Cardinal, a breadth-first GraphQL execution engine that calls each field resolver once with the full set of objects at that level instead of once per object.

## 2026-03-04

- [Turso v0.5.0](https://swe.quest/articles/turso-v0-5-0-1bc59038f4941e8d.md): Turso · 2026-03-04 · Hard · 6 min read · SQLite, Storage engines, Query engines, Consistency models, Search
  Turso v0.5.0 promotes MVCC-based concurrent writes (BEGIN CONCURRENT, adapted from Hekaton) to beta.

## 2026-01-14

- [ClickHouse Release 25.12](https://swe.quest/articles/clickhouse-release-25-12-e571148b4347f1f0.md): ClickHouse · 2026-01-14 · Hard · 18 min read · Query engines, Analytics & OLAP, Performance engineering, Databases
  ClickHouse 25.12 ships 26 features, 31 performance optimizations and 129 bug fixes, led by three query-engine speedups.

## 2025-12-16

- [Parallelizing ClickHouse aggregation merge for fixed hash map](https://swe.quest/articles/parallelizing-clickhouse-aggregation-merge-for-fixed-hash-map-9fc83cd0ed214dc7.md): ClickHouse · 2025-12-16 · Hard · 6 min read · Query engines, Performance engineering, Concurrency, Memory management, C & C++
  ClickHouse 25.11 parallelizes the merge phase for GROUP BY on 8- and 16-bit keys, which use an array-backed FixedHashMap.

## 2025-11-05

- [Indexing sparse vectors with Turso](https://swe.quest/articles/indexing-sparse-vectors-with-turso-3c9fdb0f1a894948.md): Turso · 2025-11-05 · Hard · 8 min read · Vector search, SQLite, Query engines, Algorithms, Performance engineering
  Turso 0.3.0 adds a compact sparse vector representation (vector32\_sparse) that uses 5–50x less storage than dense vectors, plus an inverted index for nearest-neighbor search by weighted Jaccard distance.

## 2025-10-01

- [Inside Husky’s query engine: Real-time access to 100 trillion events](https://swe.quest/articles/inside-husky-s-query-engine-real-time-access-to-100-trillion-events-a64c982f47949261.md): Datadog Engineering · 2025-10-01 · Hard · 27 min read · Query engines, Storage engines, Search, Observability, Multi-tenancy
  Husky, Datadog's third-generation event store, serves interactive queries over more than 100 trillion events through four multi-tenant services: a planner that splits queries into time-based steps, orchestrators that fetch fragment metadata from FoundationDB and prune with zone maps, a metadata service, and readers that execute against fragments in blob storage.

## 2025-08-27

- [What the interns have wrought, 2025 edition](https://swe.quest/articles/what-the-interns-have-wrought-2025-edition-eda7f47e78fb3ca5.md): Jane Street Tech Blog · 2025-08-27 · Hard · 12 min read · Functional programming, Memory management, Query engines, Type systems, Performance engineering
  Jane Street's 2025 intern projects include an index-aware evaluator for JSQL, the company's internal SQL dialect, which over-approximates key ranges from WHERE clauses and specializes execution to Map, Hashtbl or multi-index containers, giving ~700x and ~30x speedups on 3.8M-row benchmarks.

## 2025-06-06

- [Fuzzer Blind Spots (Meet Jepsen!)](https://swe.quest/articles/fuzzer-blind-spots-meet-jepsen-95901ab1fc56e123.md): TigerBeetle · 2025-06-06 · Hard · 7 min read · Testing, Formal methods, Storage engines, Query engines, Debugging
  Jepsen found a missing-results bug in TigerBeetle's query engine despite four fuzzers covering it, because the VOPR and LSM query fuzzer pre-registered disjoint queries whose matching objects were always consecutive in every secondary index, so zig-zag merge join probing was never exercised.

## 2024-02-20

- [Aligning Velox and Apache Arrow: Towards composable data management](https://swe.quest/articles/aligning-velox-and-apache-arrow-towards-composable-data-management-afb27bd747bab328.md): Meta Engineering · 2024-02-20 · Hard · 8 min read · Query engines, Analytics & OLAP, Data structures, Open source, C & C++
  Apache Arrow 15 adds three columnar layouts derived from Meta's Velox Vectors: StringView, ListView and Run-End-Encoding (REE).

## 2023-05-24

- [ClickHouse Joins Under the Hood - Full Sorting Merge Join, Partial Merge Join - MergingSortedTransform](https://swe.quest/articles/clickhouse-joins-under-the-hood-full-sorting-merge-join-partial-merge-join-1ae27b9bc393d8f0.md): ClickHouse · 2023-05-24 · Hard · 32 min read · Query engines, Analytics & OLAP, Databases, Performance engineering
  ClickHouse offers two external-sort-based join algorithms that are not memory bound.

[Next page](https://swe.quest/tags/query-engines.md?difficulty=hard&page=2)

Same list as RSS: [https://swe.quest/feed.xml?difficulty=hard&tag=query-engines](https://swe.quest/feed.xml?difficulty=hard&tag=query-engines). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
