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?.
CREATE TABLE
INSERT 0 1
date | quantity | price | ratio |
---|---|---|---|
2020-05-13 | 112 | 4 | 0.0357 |
2020-05-14 | 145 | 4 | 0.0276 |
2020-05-15 | 222 | 4 | 0.0180 |
2020-05-16 | 122 | 0 | 0.0000 |
2020-05-17 | 124 | 3 | 0.0242 |
SELECT 5