Ran into this on my benchmark data set! Canceled a query that had already run for two days, found this plan: Nested Loop (cost=78,613,867,046.43 rows=20,718,100 width=1144) Oopsie! Add missing index, 6 minutes: Nested Loop (cost= 1,881,853,963.95 rows=495,950 width=1144)
Postgres performance best practice: index all foreign keys. Primary keys are automatically indexed but if you reference a primary key in another table using a foreign key, that is not automatically indexed - and an index needs to be added manually.
6
7
79
59
7K
0
0
1
0
43
United States Tendances
- 1. Polanco 6,865 posts
- 2. FINALLY DID IT 670K posts
- 3. #ThankYouCena 55.6K posts
- 4. #HappyBirthdayTaylorSwift 1,529 posts
- 5. #WombPumpFun N/A
- 6. Dick Van Dyke 38.1K posts
- 7. Garnacho 12.1K posts
- 8. The HYPE 177K posts
- 9. Go Navy 3,744 posts
- 10. Ekitike 27.9K posts
- 11. Go Army 6,317 posts
- 12. Gammas 1,781 posts
- 13. #SNME 24.3K posts
- 14. Happy 100th 13.5K posts
- 15. Selena 20.2K posts
- 16. Good Saturday 38.7K posts
- 17. #MeAndTheeSeriesEP5 1.93M posts
- 18. Everton 54.8K posts
- 19. Isak 10.7K posts
- 20. John Cena 104K posts
Loading...
Something went wrong.
Something went wrong.