set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 100 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=93.458..641.189 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=92.501..92.501 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 125.044 ms
 Execution time: 647.292 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 100 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=185.865..7803.069 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=184.784..184.784 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 219.557 ms
 Execution time: 7810.344 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 100 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=229.190..767.245 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=228.218..228.218 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 104.170 ms
 Execution time: 773.750 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 100 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=55.704..5630.748 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=55.096..55.096 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 78.376 ms
 Execution time: 5637.014 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 100 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=179.067..720.163 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=178.131..178.131 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 35.999 ms
 Execution time: 726.111 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 100 and 100000 and val != '';
                                                         QUERY PLAN                                                         
----------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=237.856..7734.227 rows=99901 loops=1)
   Recheck Cond: ((id >= 100) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=1538
   Buffers: shared read=1813
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=236.896..236.896 rows=99901 loops=1)
         Index Cond: ((id >= 100) AND (id <= 100000))
         Buffers: shared read=275
 Planning time: 50.492 ms
 Execution time: 7740.607 ms
(10 rows)

