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 Trends
- 1. Syria 338K posts
- 2. The Quant 53K posts
- 3. ISIS 49.7K posts
- 4. #ThankYouCena 102K posts
- 5. Go Navy 10.4K posts
- 6. #CelebrationBowl N/A
- 7. Prairie View 1,495 posts
- 8. SC State 1,880 posts
- 9. #AskCena 3,416 posts
- 10. Polanco 9,992 posts
- 11. John Cena 139K posts
- 12. Martinelli 9,399 posts
- 13. #SNME 36.9K posts
- 14. Gyokeres 14.2K posts
- 15. Villanova 1,488 posts
- 16. South Carolina State 1,496 posts
- 17. FINALLY DID IT 664K posts
- 18. Dick Van Dyke 53.2K posts
- 19. Barry Sanders N/A
- 20. #LightningStrikes N/A
Loading...
Something went wrong.
Something went wrong.