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?.
CREATE TABLE
INSERT 0 4
name | surname | year | count |
---|---|---|---|
Egor | null | null | 2 |
Ivan | null | null | 1 |
Dima | null | null | 1 |
null | Krid | null | 2 |
null | Maxnin | null | 1 |
null | Petrenko | null | 1 |
null | null | 14 | 1 |
null | null | 12 | 3 |
SELECT 8