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 8
id | first_status | first_status_date | last_status | last_status_date |
---|---|---|---|---|
547 | appointment | 2018-02-14 09:43:15 | sold | 2018-06-06 07:36:56 |
123 | appointment | 2018-01-09 13:18:09 | left | 2018-09-20 14:51:13 |
SELECT 2