Hacker News new | ask | show | jobs
by branko_d 2488 days ago
Some joins may be completely eliminated if the fields coming from them are omitted from the SELECT list. This happens when the DBMS can prove (through FOREIGN KEYS) that the joined row always exists, without having to ever physically retrieve that row.

This is especially important when querying views (or inline functions, if your DBMS supports them) built on top of several other layers of views.