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?.
6 rows affected
product | avg_price | normal_price | quantity | final_price |
---|---|---|---|---|
product_01 | 10 | 10 | 800 | 10 |
product_02 | 20 | 90 | 300 | 20 |
product_03 | 0 | 50 | 200 | 50 |
product_04 | 30 | 80 | 500 | 30 |
product_05 | 0 | 60 | 600 | 60 |
product_06 | 50 | 40 | 400 | 50 |