Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For kicks I tried the example given and got the below which seems more expected.


explain analyze select * from brin_test where id >= 90000;

Bitmap Heap Scan on brin_test  (cost=5.78..627.36 rows=9861 width=8) (actual time=0.373..7.309 rows=10001 loops=1)
  Recheck Cond: (id >= 90000)
  Rows Removed by Index Recheck: 3215
  Heap Blocks: lossy=59
  ->  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)
Planning Time: 0.101 ms
Execution Time: 13.485 ms


explain analyze select * from brin_test where id >= 90000 and r in (1,3);

Bitmap Heap Scan on brin_test  (cost=3.36..553.50 rows=197 width=8) (actual time=0.390..1.829 rows=200 loops=1)
  Recheck Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
  Rows Removed by Index Recheck: 13016
  Heap Blocks: lossy=59
  ->  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[])))
Planning Time: 0.089 ms
Execution Time: 1.978 ms

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux