On Tue, Feb 26, 2019 at 09:07:01PM +0100, Markus Winand wrote:
> CREATE INDEX idx ON tbl (a, b, c);
> Bitmap Heap Scan on tbl (cost=4.14..8.16 rows=1 width=7616) (actual time=0.021..0.021 rows=1 loops=1)
> Recheck Cond: ((a = 1) AND (c = 1))
> -> Bitmap Index Scan on idx (cost=0.00..4.14 rows=1 width=0) (actual time=0.018..0.018 rows=1 loops=1)
> Index Cond: ((a = 1) AND (c = 1))
>
> (As a side node: I also dislike it how Bitmap Index Scan mixes search conditions and filters in “Index Cond”)
I don't think it's mixing them; it's using index scan on leading *and*
nonleading column. That's possible even if frequently not efficient.
Justin