                                                                                QUERY PLAN                                                                                
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Merge Join  (cost=175035.85..2125423.94 rows=556 width=4) (actual time=588.529..16343.750 rows=86801 loops=1)
   Merge Cond: ((lineitem.l_partkey = partsupp.ps_partkey) AND (lineitem.l_suppkey = partsupp.ps_suppkey))
   ->  Group  (cost=0.56..1857643.36 rows=5998614 width=8) (actual time=0.071..15284.268 rows=7995644 loops=1)
         Group Key: lineitem.l_partkey, lineitem.l_suppkey
         ->  Index Only Scan using idx_lineitem_part_supp on lineitem  (cost=0.56..1557712.67 rows=59986140 width=8) (actual time=0.069..11030.543 rows=59983724 loops=1)
               Heap Fetches: 0
   ->  Sort  (cost=175035.28..175957.14 rows=368743 width=12) (actual time=587.760..592.176 rows=86836 loops=1)
         Sort Key: partsupp.ps_partkey, partsupp.ps_suppkey
         Sort Method: quicksort  Memory: 7143kB
         ->  Nested Loop  (cost=0.43..140940.83 rows=368743 width=12) (actual time=0.111..567.359 rows=86836 loops=1)
               ->  Seq Scan on part  (cost=0.00..65962.39 rows=20202 width=4) (actual time=0.030..375.667 rows=21709 loops=1)
                     Filter: ((p_name)::text ~~ 'hot%'::text)
                     Rows Removed by Filter: 1978291
               ->  Index Only Scan using partsupp_pkey on partsupp  (cost=0.43..3.53 rows=18 width=8) (actual time=0.007..0.008 rows=4 loops=21709)
                     Index Cond: (ps_partkey = part.p_partkey)
                     Heap Fetches: 0
 Planning time: 1.339 ms
 Execution time: 16346.623 ms
(18 rows)

                                                                          QUERY PLAN                                                                          
--------------------------------------------------------------------------------------------------------------------------------------------------------------
 Merge Join  (cost=221656.40..473437.31 rows=19 width=4) (actual time=672.981..2047.363 rows=650135 loops=1)
   Merge Cond: ((lineitem.l_partkey = partsupp.ps_partkey) AND (lineitem.l_suppkey = partsupp.ps_suppkey))
   ->  Sort  (cost=221617.04..222975.00 rows=543181 width=12) (actual time=672.919..701.066 rows=650135 loops=1)
         Sort Key: lineitem.l_partkey, lineitem.l_suppkey
         Sort Method: quicksort  Memory: 55052kB
         ->  Nested Loop  (cost=0.56..169876.14 rows=543181 width=12) (actual time=0.026..545.387 rows=650135 loops=1)
               ->  Seq Scan on part  (cost=0.00..65962.39 rows=20202 width=4) (actual time=0.015..297.862 rows=21709 loops=1)
                     Filter: ((p_name)::text ~~ 'hot%'::text)
                     Rows Removed by Filter: 1978291
               ->  Index Only Scan using idx_lineitem_part_supp on lineitem  (cost=0.56..4.87 rows=27 width=8) (actual time=0.003..0.009 rows=30 loops=21709)
                     Index Cond: (l_partkey = part.p_partkey)
                     Heap Fetches: 0
   ->  Index Only Scan using partsupp_pkey on partsupp  (cost=0.43..207746.81 rows=7999892 width=8) (actual time=0.018..781.298 rows=8563023 loops=1)
         Heap Fetches: 0
 Planning time: 0.929 ms
 Execution time: 2065.439 ms
(16 rows)

                                                                    QUERY PLAN                                                                    
--------------------------------------------------------------------------------------------------------------------------------------------------
 Nested Loop  (cost=1.00..669273.00 rows=22 width=372) (actual time=0.064..4025.504 rows=650135 loops=1)
   ->  Nested Loop  (cost=0.43..218417.03 rows=80806 width=274) (actual time=0.032..513.791 rows=86836 loops=1)
         ->  Seq Scan on part  (cost=0.00..65962.39 rows=20202 width=130) (actual time=0.020..297.632 rows=21709 loops=1)
               Filter: ((p_name)::text ~~ 'hot%'::text)
               Rows Removed by Filter: 1978291
         ->  Index Scan using idx_partsupp_partkey on partsupp  (cost=0.43..7.37 rows=18 width=144) (actual time=0.008..0.009 rows=4 loops=21709)
               Index Cond: (ps_partkey = part.p_partkey)
   ->  Index Scan using idx_lineitem_part_supp on lineitem  (cost=0.56..5.57 rows=1 width=98) (actual time=0.007..0.039 rows=7 loops=86836)
         Index Cond: ((l_partkey = partsupp.ps_partkey) AND (l_suppkey = partsupp.ps_suppkey))
 Planning time: 0.923 ms
 Execution time: 4043.329 ms
(11 rows)
