Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I ran into this recently on a newer version. Postgres will not use the presence of a foreign key (referencing a unique index) to skip unnecessary inner joins.


I have done my own (simple) testing on Postgres 13 and was unable to make Postgres elide the join.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: