set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 10 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=221.017..1204.530 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=219.252..219.252 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 67.422 ms
 Execution time: 1210.436 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 10 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=76.373..1050.587 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=75.084..75.084 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 226.448 ms
 Execution time: 1056.646 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 10 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=73.445..572.063 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=69.802..69.802 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 81.470 ms
 Execution time: 578.102 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 10 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=86.443..390.993 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=84.674..84.674 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 70.473 ms
 Execution time: 396.996 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 10 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=88.863..592.854 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=87.113..87.113 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 28.657 ms
 Execution time: 598.842 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 10 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=210.075..549.281 rows=99991 loops=1)
   Recheck Cond: ((id >= 10) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1539
   Buffers: shared read=1814
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=208.739..208.739 rows=99991 loops=1)
         Index Cond: ((id >= 10) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 105.395 ms
 Execution time: 555.258 ms
(10 rows)

