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=17.375..3219.441 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.395..4.395 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 54.792 ms
 Execution time: 3258.220 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=7.380..3340.111 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.771..5.771 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 49.513 ms
 Execution time: 3345.689 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=16.829..2496.895 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=8.555..8.555 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 23.371 ms
 Execution time: 2516.558 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=16.449..1814.281 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.491..3.491 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 39.619 ms
 Execution time: 1816.150 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=15.707..1063.514 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.766..2.766 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 31.394 ms
 Execution time: 1083.018 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=7.408..2346.711 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.797..5.797 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 54.302 ms
 Execution time: 2349.064 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=23.167..766.435 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.966..3.966 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 81.160 ms
 Execution time: 771.776 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=16.288..1533.262 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.301..3.301 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 33.685 ms
 Execution time: 1536.146 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=46.363..541.043 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=27.159..27.159 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 53.483 ms
 Execution time: 560.471 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=5.977..393.919 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.378..4.378 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 86.684 ms
 Execution time: 404.113 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=5.050..314.462 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.852..3.852 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 90.350 ms
 Execution time: 318.271 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=9.144..408.295 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.653..5.653 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 50.658 ms
 Execution time: 411.978 ms
(9 rows)

