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?.
5 rows affected
row | col1 | col2 | col3 | result | grp | result |
---|---|---|---|---|---|---|
1 | 10 | 20 | 100 | 30 | 3 | 30 |
2 | 20 | 40 | 200 | 60 | 2 | 60 |
3 | 30 | 60 | 0 | 260 | 1 | 260 |
4 | 40 | 70 | 0 | 200 | 1 | 200 |
5 | 50 | 80 | 50 | 130 | 1 | 130 |