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 12
device | col2 | col3 | ts | bingo |
---|---|---|---|---|
cpu1 | 5.9 | 0.1 | 01:35:00 | t |
cpu3 | 6.2 | 4.8 | 01:20:00 | t |
cpu3 | 3.1 | 1.0 | 01:40:00 | t |
SELECT 3
device | col2 | col3 | ts | bingo |
---|---|---|---|---|
cpu3 | 6.2 | 4.8 | 01:20:00 | t |
cpu3 | 3.1 | 1.0 | 01:40:00 | t |
SELECT 2