Re:PostgreSQL views and materialized views and how they infl...
by michael1999 on Thursday July 14, 2022 @03:25PM
(#32100460)
How would that work? Your schema allows an employee to be assigned to multiple departments, and the query must count them.
[ Parent
| on HN ]
Re:PostgreSQL views and materialized views and how they infl...
by atwebb on Thursday July 14, 2022 @07:58PM
(#32102844)
It is also called Table Elimination if you want a google-able term.
Re:PostgreSQL views and materialized views and how they infl...
by jmalicki on Thursday July 14, 2022 @04:05PM
(#32100847)
Because of the foreign key, the query should reduce to "explain select count(*) from Department d;"
Re:PostgreSQL views and materialized views and how they infl...
by doctor_eval on Thursday July 14, 2022 @05:30PM
(#32101689)
The schema only allows one employee per department, so there is no need to look up the employee table.