add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
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 11
agent_id start_dt end_dt
666 2024-01-26 01:00:00 2024-01-26 02:00:00
3148 2024-01-25 12:30:02 2024-01-25 22:23:57
3148 2024-01-25 22:24:57 2024-01-25 22:26:57
3148 2024-01-25 23:00:00 null
SELECT 4
CREATE FUNCTION
agent_id start_dt end_dt
666 2024-01-26 01:00:00 2024-01-26 02:00:00
3148 2024-01-25 12:30:02 2024-01-25 22:23:57
3148 2024-01-25 22:24:57 2024-01-25 22:26:57
3148 2024-01-25 23:00:00 null
SELECT 4