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 10
c_id | c_date | c_sit | c_value | c_category |
---|---|---|---|---|
147121 | 2022-06-06 | 25 | 4 | |
147121 | 2022-06-06 | 23 | 3 | |
147121 | 2022-06-07 | 25 | 5 | |
147121 | 2022-11-23 | 25 | 1 | |
147121 | 2022-11-16 | 25 | 3 | |
147121 | 2023-10-08 | 25 | 2 | |
147121 | 2023-10-09 | 25 | 5 | |
147121 | 2022-04-14 | 25 | 4 | |
147121 | 2022-04-15 | 25 | 6 | |
147121 | 2022-04-16 | 25 | 1 |
SELECT 10