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?.
SELECT 5
Parent name | avg |
---|---|
PN1 | 3 |
PN1 | 6 |
PN2 | 6 |
PN2 | 3 |
SELECT 4
Parent name | avg | calculation |
---|---|---|
PN1 | 3.0000000000000000 | (2+4)/2 |
PN1 | 6.0000000000000000 | (6)/1 |
PN2 | 3.0000000000000000 | (3)/1 |
PN2 | 6.0000000000000000 | (6)/1 |
SELECT 4
?column? |
---|
0 |
SELECT 1