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 5
value1 | datetest | diff |
---|---|---|
7263 | 2021-03-31 | 474 |
6789 | 2020-03-31 | 442 |
6347 | 2019-03-31 | 300 |
6047 | 2018-03-31 | 400 |
5647 | 2017-03-31 | null |
SELECT 5