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 10000
CREATE INDEX
QUERY PLAN |
---|
Bitmap Heap Scan on tbl (cost=4.80..52.64 rows=50 width=32) |
Filter: (string ~ '^1234'::text) |
-> Bitmap Index Scan on tbl_string_text_pattern_idx (cost=0.00..4.79 rows=50 width=0) |
Index Cond: ((string ~>=~ '1234'::text) AND (string ~<~ '1235'::text)) |
EXPLAIN