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
CREATE INDEX
QUERY PLAN |
---|
Bitmap Heap Scan on test_c (cost=4.24..14.81 rows=9 width=16) |
Recheck Cond: ((COALESCE(updt_dttm, load_dttm) > '2020-04-10 23:29:44.596311+01'::timestamp with time zone) AND (COALESCE(updt_dttm, load_dttm) <= '2020-04-11 23:29:44.596311+01'::timestamp with time zone)) |
-> Bitmap Index Scan on idx_test_c (cost=0.00..4.24 rows=9 width=0) |
Index Cond: ((COALESCE(updt_dttm, load_dttm) > '2020-04-10 23:29:44.596311+01'::timestamp with time zone) AND (COALESCE(updt_dttm, load_dttm) <= '2020-04-11 23:29:44.596311+01'::timestamp with time zone)) |
EXPLAIN