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
7千
0
0
1
0
43
United States 趨勢
- 1. Brown University 68.5K posts
- 2. #ThankYouCena 159K posts
- 3. Melvin Council N/A
- 4. Brunson 6,498 posts
- 5. #SNME 57.4K posts
- 6. Rhode Island 27.5K posts
- 7. Suggs 1,889 posts
- 8. Army 269K posts
- 9. #AEWCollision 10.3K posts
- 10. Zerpa 1,294 posts
- 11. John Cena 176K posts
- 12. Syria 378K posts
- 13. Mears 1,576 posts
- 14. #UFCVegas112 3,910 posts
- 15. Azzi 6,491 posts
- 16. #kubball N/A
- 17. Arsenal 217K posts
- 18. Paolo 8,885 posts
- 19. Hofstra 1,234 posts
- 20. ISIS 75.3K posts
Loading...
Something went wrong.
Something went wrong.