set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=64.175..222.855 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=63.427..63.427 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 34.834 ms
 Execution time: 226.094 ms
(10 rows)

set effective_io_concurrency=1; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=59.182..2581.137 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=58.386..58.386 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 57.553 ms
 Execution time: 2584.720 ms
(10 rows)

set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=52.851..1427.939 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=52.253..52.253 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 56.891 ms
 Execution time: 1431.037 ms
(10 rows)

set effective_io_concurrency=1; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=22.870..2647.749 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=22.088..22.088 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 48.386 ms
 Execution time: 2651.834 ms
(10 rows)

set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=59.474..342.126 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=58.682..58.682 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 89.013 ms
 Execution time: 345.194 ms
(10 rows)

set effective_io_concurrency=1; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 50000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=49.067..2324.830 rows=50001 loops=1)
   Recheck Cond: ((id >= 50000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=770
   Buffers: shared read=909
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=48.311..48.311 rows=50001 loops=1)
         Index Cond: ((id >= 50000) AND (id <= 100000))
         Buffers: shared read=139
 Planning time: 61.570 ms
 Execution time: 2328.844 ms
(10 rows)

