set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=12.544..4609.399 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=4.276..4.276 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 55.646 ms
 Execution time: 4611.075 ms
(9 rows)

set effective_io_concurrency=1; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=5.470..3563.328 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=3.856..3.856 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 206.631 ms
 Execution time: 3583.286 ms
(9 rows)

set effective_io_concurrency=2; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                          QUERY PLAN                                                          
------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=34.936..2400.866 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=33.755..33.755 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 161.672 ms
 Execution time: 2404.817 ms
(9 rows)

set effective_io_concurrency=4; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=7.707..1600.802 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=4.182..4.182 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 25.609 ms
 Execution time: 1602.766 ms
(9 rows)

set effective_io_concurrency=8; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                          QUERY PLAN                                                          
------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=25.314..1799.187 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=21.776..21.776 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 188.550 ms
 Execution time: 1811.409 ms
(9 rows)

set effective_io_concurrency=16; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=6.279..1660.896 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=2.774..2.774 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 799.370 ms
 Execution time: 1688.752 ms
(9 rows)

set effective_io_concurrency=32; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=7.012..604.890 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=5.839..5.839 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 76.488 ms
 Execution time: 613.454 ms
(9 rows)

set effective_io_concurrency=64; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                          QUERY PLAN                                                          
------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=158.038..682.331 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=12.454..12.454 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 82.604 ms
 Execution time: 686.325 ms
(9 rows)

set effective_io_concurrency=128; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=9.096..424.213 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=5.598..5.598 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 194.897 ms
 Execution time: 425.590 ms
(9 rows)

set effective_io_concurrency=256; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                          QUERY PLAN                                                          
------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=25.450..1390.503 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=17.171..17.171 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 47.904 ms
 Execution time: 1394.318 ms
(9 rows)

set effective_io_concurrency=512; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                          QUERY PLAN                                                          
------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=33.754..1577.645 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=30.233..30.233 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 31.658 ms
 Execution time: 1579.458 ms
(9 rows)

set effective_io_concurrency=1000; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers) select * from test where ((id%100)=0) and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=527.22..11402.22 rows=498 width=36) (actual time=7.186..412.717 rows=1000 loops=1)
   Filter: ((val <> ''::text) AND ((id % 100) = 0))
   Heap Blocks: exact=1000
   Buffers: shared read=1005
   ->  Bitmap Index Scan on sparse_idx  (cost=0.00..527.09 rows=50000 width=0) (actual time=5.577..5.577 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 80.197 ms
 Execution time: 414.184 ms
(9 rows)

