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
7tys.
0
0
1
0
43
United States Trendy
- 1. TravisScott 5,291 posts
- 2. Epstein 550K posts
- 3. Bill Clinton 30.2K posts
- 4. Elise Stefanik 6,442 posts
- 5. Rays 14.9K posts
- 6. Michael Jackson 19.4K posts
- 7. Lamarr Wilson 2,616 posts
- 8. Randy Moss 5,806 posts
- 9. Jake Paul 33.7K posts
- 10. Dashie N/A
- 11. Kennedy Center 181K posts
- 12. Tucker 189K posts
- 13. Pirates 20.1K posts
- 14. EsDeeKid 5,657 posts
- 15. The DOJ 113K posts
- 16. timmy tim N/A
- 17. Shane Baz 3,654 posts
- 18. Marty Supreme 10.4K posts
- 19. Sought 18.7K posts
- 20. Oklahoma 29K posts
Loading...
Something went wrong.
Something went wrong.