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 Tendenze
- 1. Knicks 54.7K posts
- 2. #NBACup 4,879 posts
- 3. Wemby 24.7K posts
- 4. Clarkson 6,116 posts
- 5. Tyler Kolek 3,827 posts
- 6. #NewYorkForever 3,761 posts
- 7. #WWENXT 16.8K posts
- 8. Brunson 15K posts
- 9. Mitchell Robinson 2,719 posts
- 10. Mariah 20.3K posts
- 11. Josh Hart 2,552 posts
- 12. Dylan Harper 1,777 posts
- 13. Harrison Barnes 1,392 posts
- 14. Stephon Castle 2,386 posts
- 15. Blake 21.3K posts
- 16. Thea 12.2K posts
- 17. Mike Brown 3,168 posts
- 18. Thug 17K posts
- 19. Adam Silver 2,364 posts
- 20. #TheVoice 5,333 posts
Loading...
Something went wrong.
Something went wrong.