Hints and hazards: pg_plan_advice in PG19
Postgres 19 adds two contrib modules for query hints: pg_plan_advice, which applies advice per session via SET, and pg_stash_advice, which attaches advice to specific query identifiers.
Topics Data & databases
Query planning, optimization and execution engines.
Search within Query engines, or combine it with other topics →
Postgres 19 adds two contrib modules for query hints: pg_plan_advice, which applies advice per session via SET, and pg_stash_advice, which attaches advice to specific query identifiers.
A single lateral-join query answering "who's on call for this rotation layer right now" consumed 34% of incident.io's Postgres replica CPU.
pg_clickhouse 0.11.1 maps pgvector's vector type to ClickHouse Array(Float32/Float64) columns.
Postgres 19 is an operations-focused release that adds REPACK (CONCURRENTLY) for online table rebuilding and clustering via logical decoding, pg_plan_advice/pg_stash_advice for stabilizing bad plans by query ID, parallel autovacuum with priority scoring, WAIT FOR LSN for read-your-writes on replicas, and logical replication sequence sync.
DuckDB stores data by column and processes it in vectors of 2,048 values, which drives its compression, projection pushdown and aggregation speed.
ClickHouse 26.10 ships 104 features, 225 performance optimizations and 739 bug fixes.
GroeneAI is a fully autonomous AI agent, built on the open-source Nerve runtime, that finds, reproduces and fixes ClickHouse bugs from CI failures, fuzzer findings and user reports, then shepherds its PRs through CI and review; it has passed 3,000 merged PRs.
In the CostBench streaming benchmark (113.2 billion stock quotes ingested at about 1M rows/s while queries ran), ClickHouse Cloud scored 412× to 1,996× better end-to-end performance per dollar than Snowflake, Databricks, BigQuery and Redshift Serverless.
ClickHouse's new cost-based join optimizer uses an exhaustive DPsub dynamic-programming enumerator over table-subset bitmasks.
ClickHouse, run unmodified on NVIDIA's early-access Vera CPU (2×88 Arm Olympus cores, 352 SMT threads, ~1.2 TB/s memory bandwidth), topped the ClickBench hardware leaderboard.
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.
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.
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.
Turso 0.8 targets SQLite's single-writer bottleneck with BEGIN CONCURRENT, an MVCC mode where transactions start independently and commit in groups.
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`.
Quail is a query-aware inference layer that jointly optimizes AI-SQL query planning and LLM inference.
Notes from PGDay Lowlands in Utrecht and Percona Live in Amsterdam, covering two ClickHouse-maintained Postgres extensions and several PostgreSQL 19 features. pg_clickhouse is a foreign data wrapper that lets unmodified Postgres queries and ORMs run against ClickHouse via pushdown, with 15 of 22 TPC-H queries fully pushed down. pg_stat_ch streams per-query execution events through a shared-memory ring buffer to ClickHouse without back-pressure.
ClickHouse Cloud On-Demand Compute, now in private preview, lets a query run on a shared pool of ClickHouse workers outside the service's own cluster by setting make_distributed_plan and distributed_plan_workers_num.
ClickHouse 26.8 adds pipelined SQL via a `|>` operator that lets queries be written as a sequence of transformations (FROM, WHERE, AGGREGATE, EXTEND, ORDER BY, LIMIT), building on the FROM-first syntax available since 22.12.
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.
Postgres SELECT DISTINCT always scans every index entry matching its predicates, so its cost grows with total matching rows rather than with the number of distinct values.
ClickHouse 26.7 ships 61 features, 112 performance optimizations and 329 bug fixes, led by a fused ordered-aggregation pipeline that pushes LIMIT into in-order GROUP BY.
Turso, a Rust rewrite of SQLite, is adding a Postgres frontend by parsing Postgres SQL into a common AST and compiling it to Turso's VDBE bytecode, turning the engine into an "LLVM of databases" with pluggable frontends.
pg_re2 is a Postgres extension that replaces backtracking POSIX regex with Google's automata-based RE2 engine, beating Postgres builtins by 1.8x to 8.6x on table scans and 1.1x to 1.8x on index scans.
With inference costs falling roughly 50x per year, near-free intelligence creates three research directions for data systems.
ClickHouse 26.6 ships 56 features, 79 performance optimizations and 366 bug fixes, marking ten years of ClickHouse as open source.
ClickStack's OpenTelemetry logs schema, inherited from the ClickHouse exporter for the OTel Collector, was reworked through a benchmark-driven process.
ClickHouse became 26× faster on the join-heavy TPC-H SF100 workload between 22.4 and 26.4.
On TPC-H SF100 (100 GB, 866M rows, 22 join-heavy queries), a single 59-core Graviton3 ClickHouse Cloud node finished hot runs in 19.8s for $0.063.
ClickHouse 26.5 ships 38 features, 51 performance optimizations and 224 bug fixes.
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.
ClickHouse's SAMPLE clause runs aggregations over a deterministic subset of rows selected by a hash-based sample key, which must be part of the primary key so granules above the hash threshold can be skipped.
pg_clickhouse, a Postgres foreign data wrapper for ClickHouse, decides clause by clause how much of a query to push down as ClickHouse SQL.
ClickHouse 26.4 ships 39 features, 45 performance optimizations and 238 bug fixes, led by SQL-compatibility additions: VALUES as a table expression with column aliases, PostgreSQL-style EXTRACT units, SET TIME ZONE, NATURAL JOIN and compound INTERVAL literals.
pg_clickhouse, the Postgres foreign data wrapper for querying ClickHouse, now pushes down far more operations to ClickHouse.
Index sharding in ClickHouse Cloud splits primary and secondary index analysis across replicas using consistent hashing over data parts.
ClickHouse offers three index-based ways to skip data: the sparse primary index (one entry per 8,192-row granule), lightweight projections that store only a sort key plus a _part_offset pointer into the base table, and skip indexes such as minmax that keep per-granule min/max values.
ClickHouse 26.3 ships 27 features, 40 performance optimizations and 202 bug fixes.
LLMs can act as semantic cardinality estimators that fix join-order mistakes in database physical plans without modifying the engine.
ClickHouse now queries Apache Iceberg and Delta Lake tables in place on S3, GCS and Azure, either directly or through catalogs such as AWS Glue, Unity, Polaris, BigLake, OneLake and Iceberg REST.
ClickStack speeds up ClickHouse for observability by generating and rewriting queries to fit how the engine stores, prunes and processes data, instead of passing raw SQL through.
ClickHouse 26.2 ships 25 features, 43 performance optimizations and 183 bug fixes, and promotes the text index and QBit vector data type to production-ready.
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.
chDB 4 adds DataStore, a Pandas-compatible API that records operations lazily as a chain of LazyOps, then compiles them into ClickHouse SQL with filter pushdown, column pruning and limit propagation, executing in-process on the ClickHouse engine.
Turso v0.5.0 promotes MVCC-based concurrent writes (BEGIN CONCURRENT, adapted from Hekaton) to beta.
ClickHouse 25.12 ships a batch of end-of-year improvements, from client usability tweaks (digit-group highlighting in the prompt, per-row readable numeric hints) to query engine optimizations. distinctJSONPaths now merges per-part JSON path metadata instead of decoding column data, cutting a 10M-row BlueSky query from 4.56 s to 82 ms. DISTINCT on LowCardinality columns now works on dictionary IDs with early exit, typically 2-6x faster, but slower on a sorting-key column where unique values are spread across the whole table.
ClickHouse can now use minmax data-skipping indexes to prune whole granules for ORDER BY … LIMIT N queries before reading any rows.
ClickHouse 25.12 ships 26 features, 31 performance optimizations and 129 bug fixes, led by three query-engine speedups.
ClickHouse lightweight projections, which store only a sorting key plus a _part_offset pointer into the base table, now act as true secondary indexes with granule-level pruning instead of only pruning whole parts.
ClickHouse 25.9 introduces streaming secondary indices, which check skip-index entries (minmax, set, bloom filter, vector, text) incrementally as each table granule is about to be read, instead of scanning the whole index before query execution.
chDB, ClickHouse embedded as a Python library, removed the four serialization steps that made every v1 query take over 100ms by reading Pandas DataFrames in place.
Turso v0.4.0 overhauls its experimental MVCC mode, which lifts SQLite's single-writer limit, adding index support, checkpointing and recovery.
ClickStack's HyperDX UI can now use ClickHouse Incremental Materialized Views registered against a source to accelerate charts, searches, histograms and dashboards, even when filters are applied.
ClickHouse shipped 12 releases in 2025 with 277 new features, 319 performance optimizations and 1,051 bug fixes.
ClickHouse 25.11 parallelizes the merge phase for GROUP BY on 8- and 16-bit keys, which use an array-backed FixedHashMap.
pg_clickhouse v0.1.0 is an Apache 2-licensed PostgreSQL foreign data wrapper, derived from clickhouse_fdw, that runs analytics queries on ClickHouse from Postgres so existing queries can work unmodified by changing search_path.
ClickHouse 25.11 ships 24 features, 27 performance optimizations and 97 bug fixes.
Sharding Postgres early avoids the operational pain of large single instances, illustrated by an outage where stale planner statistics caused a 300 GB table to be sequentially scanned.
ClickHouse 25.10 focuses on JOIN performance, adding lazy columns replication (an index column pointing at the original data instead of copying duplicated values), runtime Bloom filters built from the right-side join keys and applied as PREWHERE on the left side for parallel hash joins, push-down of OR conditions that reference both join sides, and automatic column statistics via auto_statistics_types to feed join reordering.
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.
ClickHouse's DataLakeCatalog database engine connects to lakehouse catalogs such as AWS Glue and Databricks Unity Catalog, reads their metadata, and automatically maps each table to the matching Iceberg or DeltaLake table engine.
Turso adds experimental Live Materialized Views to its SQLite-compatible database, using Incremental View Maintenance based on the DBSP framework so views update in time proportional to the size of changes rather than the base tables.
ClickHouse 25.9 adds automatic global join reordering, which uses a greedy algorithm plus row-count estimates or manually created column statistics to pick build/probe order across many tables.
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.
ClickHouse Cloud's parallel replicas feature spreads a single GROUP BY query across every core of every node in a service, with no pre-aggregation or data reshuffling.
online_advisor is a Postgres extension that hooks into the executor (like auto_explain) to watch the live workload and recommend indexes, extended statistics, or prepared statements without applying anything automatically.
ClickHouse 25.8 ships 45 features, 47 performance optimizations and 119 bug fixes.
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.
ClickHouse 25.7 adds standard SQL UPDATE and DELETE built on lightweight "patch parts".
ClickHouse 25.6 (25 features, 32 performance optimizations, 105 bug fixes) can take a single consistent storage snapshot across all subqueries and CTEs in a SELECT, controlled by enable_shared_storage_snapshot_in_query.
Replacing fact-to-dimension joins with in-memory dictionaries in ClickHouse Cloud sped up a 17-query join benchmark over 1.4 billion rows by 1.9–3.5× in total runtime, up to 6.6× on individual queries, and cut cost by up to 60%.
ClickHouse Cloud ran a third-party, join-heavy coffee-shop star-schema benchmark (17 queries, originally built to compare Databricks and Snowflake) with no query rewrites or tuning, and came out faster and cheaper at every scale from 721 million to 7.2 billion rows.
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.
Neon's 2025-05-16 us-east-1 outage was triggered when the Postgres planner for the control plane database switched to a suboptimal index for the Activity Monitor query that finds idle Computes to suspend.
ClickHouse 25.4 adds lazy materialization, which defers reading column data until it is needed.
ClickHouse queries Parquet files directly, without ingestion, through a format-specific reader that currently parses via Arrow and then converts into ClickHouse's in-memory format.
ClickHouse 25.4 adds lazy materialization, which defers reading column data until the query plan actually needs it.
ClickHouse 25.3 adds a query condition cache that records, per table, data part and predicate hash, a bit per granule indicating whether any row matched the WHERE condition, so repeated filters can skip non-matching granules.
ClickHouse 25.3 adds query support for AWS Glue and Unity lakehouse catalogs and declares the columnar JSON type, along with the Variant and Dynamic types it is built on, production-ready.
DuckDB's delta extension v0.3.0 runs TPC-DS SF1 on S3 more than 3× faster than v0.1.0, mostly because cardinality information now reaches DuckDB's join order optimizer.
ClickHouse 25.2 ships 12 features, 15 performance optimizations and 72 bug fixes.
ClickHouse fits into data lake and lakehouse architectures in three common ways: incrementally loading object-storage or Iceberg data via s3cluster/S3Queue (or double-writing from Kafka), running ad-hoc and federated queries against Iceberg, Delta and Hudi tables plus PostgreSQL, MySQL and MongoDB, and frequently querying shared lakehouse datasets.
ClickHouse 25.1 speeds up the default parallel hash join by building N two-level hash tables whose 256 buckets are filled by threads in a non-overlapping way, then merging them in constant time into one shared table.
ClickHouse 24.12 adds LIKE and unknown-value equality/IN support for Enums, an experimental descending MergeTree sorting key, JSON subcolumns as primary key columns, Iceberg REST catalog (Unity, Polaris) and schema evolution support, and automatic JOIN side swapping via query_plan_join_swap_table.
Slow ClickHouse queries can be diagnosed with system.query_log (duration, rows read, memory, CPU, cache metrics) and the EXPLAIN statement, illustrated on the NYC Taxi dataset in the ClickHouse Playground.
ClickHouse 24.11 makes parallel hash join the default join algorithm, building several hash tables concurrently for speed at the cost of more memory, and adds zero-copy block scattering between threads.
chDB, the in-process embedded ClickHouse, sped up SQL queries over Pandas DataFrames 87x by replacing its original Parquet serialize/deserialize round-trip through file descriptors with a native Python table engine that reads Python objects directly.
ClickHouse 24.7 adds buffering for read-in-order queries (read_in_order_use_buffering), restoring read parallelism when ORDER BY matches the primary key.
Random sampling from billion-row PostgreSQL tables with ORDER BY random() scans every row and runs a top-N heapsort, taking over a minute.
ClickHouse 24.5 adds an experimental Dynamic data type for semi-structured columns that accepts values of any type without declaring them upfront like Variant, and queries them via dynamicType, dynamicElement and dot syntax.
Meta has been decomposing its many monolithic data engines (ETL, interactive, streaming, ML preprocessing) into reusable components: language frontend, IR, optimizer, execution library and runtime.
A simple LIMIT 1 join between a ~100k-row postgres_dbs table and a ~90M-row events table ran for hours.
ClickHouse runs count(*) GROUP BY aggregations in parallel at three levels: SIMD within column values, multiple cores over arbitrary data ranges, and multiple nodes over shards.
ClickHouse 24.4 adds standard SQL:1999 recursive CTEs, built on the new query analyzer now enabled by default, which pass PostgreSQL's recursive CTE tests and allow multiple queries and base-table references in the recursive part.
ClickHouse 24.3 enables the new query analyzer by default (beta), which fixes nested CTE/join column resolution, allows multiple ARRAY JOIN clauses, treats tuple elements like columns, and supports lambda aliases; the old implementation is slated for removal in 24.4/24.5.
Figma horizontally sharded its RDS Postgres stack after vertical partitioning ran out of room.