Re: Index INCLUDE vs. Bitmap Index Scan - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Index INCLUDE vs. Bitmap Index Scan
Date
Msg-id 20190227010059.GC28750@telsasoft.com
Whole thread Raw
In response to Index INCLUDE vs. Bitmap Index Scan  (Markus Winand <markus.winand@winand.at>)
Responses Re: Index INCLUDE vs. Bitmap Index Scan
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: NOT IN subquery optimization
Next
From: "Bossart, Nathan"
Date:
Subject: Re: New vacuum option to do only freezing