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 Tendances
- 1. Eagles 54.1K posts
- 2. Tulane 21.3K posts
- 3. Josh Johnson 3,109 posts
- 4. Jake Elliot 3,586 posts
- 5. $ENX 2,418 posts
- 6. Saquon 6,728 posts
- 7. Ole Miss 16.1K posts
- 8. Steen 3,093 posts
- 9. Jordan Davis N/A
- 10. Dan Quinn N/A
- 11. Shipley 1,757 posts
- 12. Miami 115K posts
- 13. Mariota 2,909 posts
- 14. #PHIvsWAS 1,470 posts
- 15. #RaiseHail 2,071 posts
- 16. Oregon 20.2K posts
- 17. Tank Bigsby N/A
- 18. Top G 127K posts
- 19. Reed Sheppard 1,563 posts
- 20. Cooper DeJean 1,174 posts
Loading...
Something went wrong.
Something went wrong.