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 9
range_agg |
---|
{(,)} |
SELECT 1
r | bin_range |
---|---|
[2,13) | [1,8) |
[9,14) | [8,9) |
(,) | empty |
[11,25) | [10,20) |
[16,35) | [15,30) |
[36,45) | [35,40) |
[41,55) | [40,50) |
[51,65) | [50,60) |
[61,75) | [60,70) |
SELECT 9