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 14
t_id | work_interval |
---|---|
1 | 02:00:00 |
2 | 07:00:00 |
3 | 03:00:00 |
4 | 10:00:00 |
5 | 10:00:00 |
6 | 01:49:00 |
7 | 00:01:00 |
8 | 07:01:00 |
9 | 00:02:00 |
10 | 07:02:00 |
11 | 00:08:00 |
12 | 00:03:00 |
13 | 00:03:00 |
14 | 00:02:00 |
SELECT 14