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?.
12 rows affected
time | status | next_time | grp |
---|---|---|---|
12:00:00 | 0 | 13:00:00 | 1 |
13:00:00 | 8 | 14:00:00 | 1 |
14:00:00 | 4 | 15:00:00 | 1 |
15:00:00 | 2 | 16:00:00 | 1 |
16:00:00 | 0 | 17:00:00 | 2 |
17:00:00 | 9 | 18:00:00 | 2 |
18:00:00 | 5 | 19:00:00 | 2 |
19:00:00 | 8 | 20:00:00 | 2 |
20:00:00 | 0 | 21:00:00 | 3 |
21:00:00 | 1 | 22:00:00 | 3 |
22:00:00 | 3 | 23:00:00 | 3 |
23:00:00 | 0 | null | 4 |
min_time | max_time | events |
---|---|---|
12:00:00 | 16:00:00 | {"(13:00:00,8)","(14:00:00,4)","(15:00:00,2)"} |
16:00:00 | 20:00:00 | {"(17:00:00,9)","(18:00:00,5)","(19:00:00,8)"} |
20:00:00 | 23:00:00 | {"(21:00:00,1)","(22:00:00,3)"} |
23:00:00 | null | null |