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?.
actioned_by | t_actioned |
---|---|
1 | 2018-09-08 23:55:00 |
1 | 2018-09-09 00:10:00 |
1 | 2018-09-10 00:05:00 |
1 | 2018-09-10 00:15:00 |
2 | 2018-09-09 20:15:00 |
2 | 2018-09-10 02:15:00 |
2 | 2018-09-10 08:15:00 |
2 | 2018-09-10 14:15:00 |
2 | 2018-09-10 20:14:00 |
SELECT 9
actioned_by | t_actioned | num_days |
---|---|---|
1 | 2018-09-08 23:55:00 | 1 |
1 | 2018-09-09 00:10:00 | 1 |
1 | 2018-09-10 00:05:00 | 2 |
1 | 2018-09-10 00:15:00 | 2 |
2 | 2018-09-09 20:15:00 | 1 |
2 | 2018-09-10 02:15:00 | 1 |
2 | 2018-09-10 08:15:00 | 1 |
2 | 2018-09-10 14:15:00 | 1 |
2 | 2018-09-10 20:14:00 | 1 |
SELECT 9