set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 10000 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=195.122..464.052 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=194.183..194.183 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 192.000 ms
 Execution time: 469.544 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 10000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=48.837..6077.655 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=48.277..48.277 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 126.891 ms
 Execution time: 6083.361 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 10000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=59.414..700.484 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=58.520..58.520 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 41.760 ms
 Execution time: 706.078 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 10000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=79.321..4063.552 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=78.748..78.748 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 52.716 ms
 Execution time: 4069.171 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 10000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=66.809..521.384 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=65.895..65.895 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 89.262 ms
 Execution time: 526.792 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 10000 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=102.541..5283.677 rows=90001 loops=1)
   Recheck Cond: ((id >= 10000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1386
   Buffers: shared read=1634
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=101.486..101.486 rows=90001 loops=1)
         Index Cond: ((id >= 10000) AND (id <= 100000))
         Buffers: shared read=248
 Planning time: 73.152 ms
 Execution time: 5289.984 ms
(10 rows)

