postgresql query optimization
PostgreSQL in Production notes about postgresql query optimization
Improve and diagnose query performance
How to Test a Fix for a Slow PostgreSQL Query
Choose a costly query and representative parameters, measure its baseline, test one plan-based change, then compare execution and results under similar conditions.

