Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction

Justin Pryzby <[email protected]>
Newsgroups gmane.comp.db.postgresql.performance
Message-ID <[email protected]>
On Thu, Jun 20, 2019 at 12:09:13PM -0600, Michael Lewis wrote:
> For kicks I tried the example given and got the below which seems more
> expected.

Do you just mean that it ran faster the 2nd time ?  Isn't that just due just to
cache effects ?  Rerun them both back to back.

See that the "actual" rowcount of the Index Scan is higher with tigher
condition:

>   ->  Bitmap Index Scan on idx_brin_test_brin  (cost=0.00..3.32 rows=14286 width=0) (actual time=0.018..0.019 rows=640 loops=1)
>         Index Cond: (id >= 90000)

>   ->  Bitmap Index Scan on idx_brin_test_brin  (cost=0.00..3.31 rows=7143 width=0) (actual time=0.026..0.027 rows=1280 loops=1)
>         Index Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.