u/O1O1O1Oin r/PostgreSQL • Recommends
Some tips on optimizing Postgres on Amazon including on Aurora
I found the first half of this video quite informative on optimizing Postgres. The remaining half is mostly about optimizing on their Aurora solution using their query plan manager.
link to this video
Here are my unedited notes:
## Top problems seen in explain analyze
- large diff in estimated vs actual rows can cause sort vs merge join - analyze?
- index usage or not
- large # of buffers read - not in mem
- "lossy" bitmap heap scan - not enough work_mem
- make functions immutable if appropriate
## Recommended PostgresSQL settings (for AWS)
- random_page_cost: 1.0 at most 1.5 for SSD (4 for rotating media)
- work_mem: up to '4GB' fo…