Unconventional PostgreSQL Optimizations
Creative ideas for speeding up queries in PostgreSQL
PostgreSQL 19 introduces a new query optimization that can aggregate data before performing joins, significantly speeding up many GROUP BY queries on large tables.
The change is especially effective when joining large fact tables with small lookup tables, reducing repeated lookups of the same dimension values. Existing SQL code and configuration generally do not need to change to benefit from this optimization.