~/talk

What’s new in the Postgres 18 query planner / optimizer

Talkat POSETTE: An Event for Postgres 2025 · 2025-06-10..06-12· [databases]
slides:none on file

PostgreSQL 18’s planner adds concrete changes: OR->IN conversion turns long OR lists into an index-friendly equals-any index scan; self-join elimination removes redundant same-table joins; EXCEPT/INTERSECT use pre-sorted input to cut a 354 ms case about 2× (→ ~177 ms); GROUP BY drops columns covered by unique indexes; lock slots increase and runtime partition pruning before locking drops lock overhead for thousands of partitions (planning now ~2× faster at 1,024 parts and ~9× at 8,000 in microsecond-scale tests using EXPLAIN/ANALYZE and commit-based benchmarks).

AI-written summary · about

  1. 0:00Introduction
  2. 1:07PostgreSQL 18 feature freeze
  3. 2:26Part 1: PostgreSQL 18 query planner’s new abilities
  4. 6:34Self join elimination
  5. 9:52Improved EXCEPT / INTERSECT support
  6. 13:31GROUP BY clause optimization
  7. 16:52Part 2: General query planner improvements
  8. 20:24Run-time pruning: v17 vs v18
  9. 23:29Planner performance improvements
  10. 26:07Other notable changes & testing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.