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
room_id | time_start | time_end |
---|---|---|
1 | 07:00:00 | 07:30:00 |
1 | 08:30:00 | 09:30:00 |
2 | 07:30:00 | 08:15:00 |
2 | 10:15:00 | 11:20:00 |
SELECT 4
free_time_start | free_time_end | ?column? |
---|---|---|
07:31:00 | 08:29:00 | t |
SELECT 1