By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
id | student | max_score | year_1 | year_2 | year_3 | year_4 | year_5 | is_a_match |
---|---|---|---|---|---|---|---|---|
1 | Alex | 7 | null | 7 | 7 | null | 7 | f |
2 | Bruno | 10 | 10 | 7 | 10 | 9 | 10 | f |
3 | Charlie | 7 | 7 | 5 | null | 7 | 7 | f |