3 ms·I would try running that fiddle on something more recent than Postgres 9.6by taspeotis 4y agoI would try running that fiddle on something more recent than Postgres 9.6mdavidn 4y agoI 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.taspeotis 4y agoI have done my own (simple) testing on Postgres 13 and was unable to make Postgres elide the join.