set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 1000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=78.191..590.813 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=77.274..77.274 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 63.696 ms
 Execution time: 596.754 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 1000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=44.169..5272.461 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=43.294..43.294 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 88.476 ms
 Execution time: 5278.683 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 1000 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=220.748..632.548 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=219.843..219.843 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 66.982 ms
 Execution time: 638.706 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 1000 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=109.375..5397.415 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=108.501..108.501 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 90.495 ms
 Execution time: 5404.002 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 1000 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=249.497..723.253 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=248.871..248.871 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 67.235 ms
 Execution time: 730.667 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 1000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=61.606..5755.039 rows=99001 loops=1)
   Recheck Cond: ((id >= 1000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1524
   Buffers: shared read=1797
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=60.675..60.675 rows=99001 loops=1)
         Index Cond: ((id >= 1000) AND (id <= 100000))
         Buffers: shared read=273
 Planning time: 59.676 ms
 Execution time: 5761.312 ms
(10 rows)

