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 4
my_date | score |
---|---|
2019-12-01 | 2 |
2019-12-01 | 4 |
2019-12-01 | 5 |
2019-12-02 | 3 |
SELECT 4
my_date | low0-2 | high3-4 | perfect |
---|---|---|---|
2019-12-01 | 1 | 1 | 1 |
2019-12-02 | 0 | 1 | 0 |
SELECT 2
my_date | low0-2 | high3-4 | perfect |
---|---|---|---|
2019-12-01 | 1 | 1 | 1 |
2019-12-02 | 0 | 1 | 0 |
SELECT 2