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?.
product | product_type | price | weight |
---|---|---|---|
1 | A | 20 | 0.28571428571428571429 |
2 | A | 20 | 0.28571428571428571429 |
3 | A | 30 | 0.42857142857142857143 |
4 | B | 30 | 1.00000000000000000000 |
5 | C | 30 | 0.42857142857142857143 |
6 | C | 40 | 0.57142857142857142857 |