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 | x | y | rollingavg |
---|---|---|---|
1 | 1 | 1 | 25 |
1 | 1 | 2 | 25.0000000000000000 |
1 | 2 | 3 | 33.5000000000000000 |
1 | 2 | 4 | 55.0000000000000000 |
1 | 3 | 5 | 64.6666666666666667 |
2 | 1 | 1 | 78 |
2 | 1 | 2 | 78.0000000000000000 |
2 | 2 | 3 | 61.5000000000000000 |
SELECT 8