An overview of the PostgreSQL query planner, including the major decisions which it makes as part of scan, join, and aggregate planning. How query planning can go wrong, including the use of statistics by the query planner, schema design tips, rewriting queries manually, and planner cost settings. Creating indexes to improve query plans. Results of an informal study on how query plans have gone wrong in the real world.
The following slides have been made available for this session: