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?.
QUERY PLAN |
---|
Seq Scan on emp (cost=0.00..26.50 rows=2 width=46) |
Filter: ((salary <= 100) AND ((title)::text = 'BOSS'::text)) |
QUERY PLAN |
---|
Result (cost=0.00..0.00 rows=0 width=0) |
One-Time Filter: false |
QUERY PLAN |
---|
Seq Scan on emp (cost=0.00..32.00 rows=2 width=46) |
Filter: ((salary <= 100) AND ((title)::text = 'BOSS'::text) AND (((title)::text <> 'BOSS'::text) OR (salary > 100))) |
QUERY PLAN |
---|
Seq Scan on emp (cost=0.00..32.00 rows=2 width=46) |
Filter: ((salary <= 100) AND ((title)::text = 'BOSS'::text) AND (((title)::text <> 'BOSS'::text) OR (salary > 100))) |