set effective_io_concurrency=0; set enable_indexscan=off; set enable_seqscan=off; explain (analyze, buffers)  select * from test where id between 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=23.536..118.559 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=22.744..22.744 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 81.158 ms
 Execution time: 120.121 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 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=18.182..2123.812 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=17.750..17.750 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 71.993 ms
 Execution time: 2125.927 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 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=24.999..114.305 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=24.241..24.241 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 64.068 ms
 Execution time: 115.865 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 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=44.066..1614.444 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=43.615..43.615 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 202.875 ms
 Execution time: 1616.534 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 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=34.898..136.291 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=34.154..34.154 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 71.123 ms
 Execution time: 138.005 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 75000 and 100000 and val != '';
                                                        QUERY PLAN                                                        
--------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on test  (cost=7.62..467.66 rows=498 width=36) (actual time=19.731..1650.069 rows=25001 loops=1)
   Recheck Cond: ((id >= 75000) AND (id <= 100000))
   Filter: (val <> ''::text)
   Heap Blocks: exact=386
   Buffers: shared read=457
   ->  Bitmap Index Scan on test_pkey  (cost=0.00..7.49 rows=500 width=0) (actual time=18.970..18.970 rows=25001 loops=1)
         Index Cond: ((id >= 75000) AND (id <= 100000))
         Buffers: shared read=71
 Planning time: 261.599 ms
 Execution time: 1651.880 ms
(10 rows)

