Blog
Field notes
Walkthroughs of the ORCA optimizer, PostgreSQL extension internals, and benchmark methodology. Written while building pg_orca.
- 10 min readpostgresorcapg_orca
Decorrelating TPC-H Q17: a walkthrough of ORCA's Apply transformation
A line-by-line look at how ORCA rewrites TPC-H Q17's correlated subquery into a join — the SubqueryHandler, the Apply2Join transformations, and a 10–19× wall-time speedup (planning + execution) across TPC-H scale factors.
Read post - 6 min readpostgresorcapg_orca
Configuring pg_orca: a guide to the GUCs you'll actually use
A practical guide to pg_orca's configuration parameters: how to enable the ORCA optimizer, pick a cost model, control join-order search, tune CTE inlining and metadata caching, and use the debug prints when investigating a plan.
Read post - 5 min readpostgresorcapg_orca
pg_orca: a Cascades-style query optimizer for vanilla PostgreSQL 18
Introducing pg_orca — a PostgreSQL 18 extension that ports the ORCA Cascades optimizer from Greenplum/HAWQ to upstream Postgres. Includes a TPC-H Q17 walkthrough showing a 20× speedup from automatic subquery decorrelation.
Read post - 11 min readpostgresorcainternals
ORCA 101: How a Cascades-style optimizer actually works
A single-node walkthrough of ORCA's four-step optimization pipeline — Memo, transformation rules, statistics, and property enforcement — and how it differs from PostgreSQL's planner.
Read post