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.094..3653.492 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.805..3.805 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 51.141 ms
 Execution time: 3655.124 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=12.310..3332.666 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.036..4.036 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 34.252 ms
 Execution time: 3337.614 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=6.620..2912.603 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.010..5.010 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 39.526 ms
 Execution time: 2914.609 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=37.166..2131.459 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=24.207..24.207 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 83.103 ms
 Execution time: 2133.285 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=22.920..1323.279 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.332..21.332 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 42.353 ms
 Execution time: 1326.740 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=41.061..1751.871 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.466..21.466 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 61.316 ms
 Execution time: 1765.848 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.098..581.204 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.493..5.493 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 21.278 ms
 Execution time: 583.176 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=27.284..540.604 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=23.772..23.772 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 57.335 ms
 Execution time: 541.667 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.055..360.629 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.543..5.543 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 189.256 ms
 Execution time: 362.409 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=27.054..438.729 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=23.574..23.574 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 82.957 ms
 Execution time: 446.026 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=6.782..412.724 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.320..3.320 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 67.023 ms
 Execution time: 416.469 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=11.492..280.698 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=10.352..10.352 rows=1000 loops=1)
         Index Cond: (((id % 100) = 0) = true)
         Buffers: shared read=5
 Planning time: 41.935 ms
 Execution time: 301.295 ms
(9 rows)

