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 example (a uuid primary key, b numeric);
INSERT INTO example(a, b)
SELECT a::uuid, b::numeric
FROM (VALUES ('d853b5a8-d453-11e7-9296-cec278b6b50a', NULL), ('bb53b5a8-d453-11e7-9296-cec278b6b50a',1) ) as data(a,b);
2 rows affected
SELECT *
FROM example
a | b |
---|---|
d853b5a8-d453-11e7-9296-cec278b6b50a | null |
bb53b5a8-d453-11e7-9296-cec278b6b50a | 1 |