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
7К
0
0
1
0
43
United States Тренды
- 1. Rays 13.9K posts
- 2. Shane Baz 3,235 posts
- 3. Pirates 19.4K posts
- 4. Michael Jackson 15.8K posts
- 5. Tucker 180K posts
- 6. Brandon Lowe 2,852 posts
- 7. Randy Moss 5,234 posts
- 8. Kennedy Center 190K posts
- 9. Jake Paul 31.8K posts
- 10. Happy Holidays 52.6K posts
- 11. Bowen Yang 2,550 posts
- 12. #FursuitFriday 15.2K posts
- 13. #FanCashDropPromotion 3,481 posts
- 14. Sought 17.9K posts
- 15. Mangum 1,857 posts
- 16. NextNRG 3,795 posts
- 17. Burrows 2,869 posts
- 18. Kennesaw State 1,979 posts
- 19. Western Michigan 2,181 posts
- 20. Astros 4,000 posts
Loading...
Something went wrong.
Something went wrong.