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?.
SELECT *
FROM generate_series('2023-10-21T00:00:00Z'::timestamp, '2023-10-21T00:25:00Z'::timestamp + interval '15 minute', '15m')
ORDER BY 1;
generate_series |
---|
2023-10-21 00:00:00 |
2023-10-21 00:15:00 |
2023-10-21 00:30:00 |
SELECT 3
SELECT *
FROM generate_series('2023-10-21T00:00:00Z'::timestamp, '2023-10-21T00:25:00Z'::timestamp, '15m')
UNION SELECT '2023-10-21T00:25:00Z'::timestamp
ORDER BY 1;
generate_series |
---|
2023-10-21 00:00:00 |
2023-10-21 00:15:00 |
2023-10-21 00:25:00 |
SELECT 3