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
77
59
7K
0
0
1
0
43
United States Tendências
- 1. The JUP 166K posts
- 2. The PENGU 164K posts
- 3. Good Monday 25.7K posts
- 4. Lorraine 10.2K posts
- 5. #oasis 2,119 posts
- 6. #MondayMotivation 24.4K posts
- 7. Victory Monday N/A
- 8. #smoothie 1,950 posts
- 9. Ravens 65.8K posts
- 10. #dash 2,039 posts
- 11. 60 Minutes 75.2K posts
- 12. #syntax 1,793 posts
- 13. Bari Weiss 63.5K posts
- 14. Greenland 7,664 posts
- 15. Patriots 130K posts
- 16. Drake Maye 28.5K posts
- 17. Lamar 28.9K posts
- 18. Harbaugh 12.2K posts
- 19. Henry 61.8K posts
- 20. TOP CALL 8,475 posts
Loading...
Something went wrong.
Something went wrong.