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
78
59
7Ribu
0
0
1
0
43
United States Tren
- 1. FINALLY DID IT 567K posts
- 2. 60 Minutes 113K posts
- 3. #IDontWantToOverreactBUT N/A
- 4. Greenland 24.3K posts
- 5. #Fliffmas N/A
- 6. Bari Weiss 94.1K posts
- 7. NextNRG Inc. N/A
- 8. Provo N/A
- 9. The Odyssey 43.4K posts
- 10. #MondayMotivation 33K posts
- 11. Bobby Petrino 1,116 posts
- 12. Chris Rea 14.1K posts
- 13. #MondayMorning 1,516 posts
- 14. #HunSen N/A
- 15. Christopher Nolan 44.9K posts
- 16. Victory Monday 2,983 posts
- 17. Happy Holidays 65.6K posts
- 18. Barry Manilow N/A
- 19. Intersect N/A
- 20. Vance 256K posts
Loading...
Something went wrong.
Something went wrong.