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
id | created_at | business_hours |
---|---|---|
9d38ea6e-7077-400d-b310-cfc47b31d482 | 2021-04-21 07:56:36 | 5168:00:00 |
9d38ea6e-7077-400d-b310-cfc47b31d481 | 2021-04-19 21:55:46 | 5176:00:00 |
9d38ea6e-7077-400d-b310-cfc47b31d479 | 2021-04-18 22:43:44 | 5184:00:00 |
9d38ea6e-7077-400d-b310-cfc47b31d480 | 2021-04-17 14:22:05 | 5184:00:00 |
SELECT 4