Postgres has some pretty great tooling around understanding slow queries — you can just ask the database to tell you what’s taking it so long.| pgMustard
19.7. Query Planning # 19.7.1. Planner Method Configuration 19.7.2. Planner Cost Constants 19.7.3. Genetic Query Optimizer 19.7.4. Other Planner Options 19.7.1. Planner …| PostgreSQL Documentation
Non-trivial tips for database development| hakibenita.com