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.