Robert HaasSr. Staff Software Engineer @ Databricks, PostgreSQL Developer and Committer

Projects › Query Performance

We're Bad At That

Architecture

No parallel query

numeric is much bigger than Oracle’s number

Bloated tables suck

Backend caches require warming

Redundant updates are expensive

AFTER trigger queues can get really big

Autovacuum doesn’t know about collecting stats on inheritance trees

Executor

Indexing unordered data causes random I/O

<> is not indexable

DISTINCT + LIMIT + HashAggregate reads all input before emitting anything

Plan Types We Can’t Generate

no parameterized paths aka generalized inner index-scans [fixed in 9.2]

parameterized paths are not generated for subqueries

parameterized path not used to avoid computing all windows for OVER

no merge append [fixed in 9.1]

can’t do batched sorts of data already ordered by leading columns