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. FINALLY DID IT 622K posts
- 2. The JUP 180K posts
- 3. Good Tuesday 40.3K posts
- 4. Susie Wiles 8,452 posts
- 5. Vanity Fair 2,850 posts
- 6. #PersonOfTheYearAwards2025 1.09M posts
- 7. #tuesdayvibe 2,719 posts
- 8. #MAGMA N/A
- 9. 4.6% in November 2,032 posts
- 10. #HeAProDriver 18.2K posts
- 11. Taco Tuesday 11.9K posts
- 12. Boston Tea Party 1,175 posts
- 13. Alex Delgado N/A
- 14. #KastNoToquesALosVenezolanos 1,743 posts
- 15. PERTHSANTA AVATAR GALA 557K posts
- 16. The BBC 128K posts
- 17. Happy Taco 9,251 posts
- 18. Namjoon 108K posts
- 19. Sheed N/A
- 20. Unemployment Rate 11.3K posts
Loading...
Something went wrong.
Something went wrong.