                                                                              QUERY PLAN                                                                              
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=286298.02..286298.27 rows=100 width=110) (actual time=9962.691..9962.715 rows=100 loops=1)
   Buffers: shared hit=189275
   ->  Sort  (cost=286298.02..286298.97 rows=378 width=110) (actual time=9962.689..9962.701 rows=100 loops=1)
         Sort Key: (substr((warehouse.w_warehouse_name)::text, 1, 20)), ship_mode.sm_type, web_site.web_name
         Sort Method: top-N heapsort  Memory: 49kB
         Buffers: shared hit=189275
         ->  HashAggregate  (cost=286278.85..286283.58 rows=378 width=110) (actual time=9961.693..9961.879 rows=420 loops=1)
               Group Key: substr((warehouse.w_warehouse_name)::text, 1, 20), ship_mode.sm_type, web_site.web_name
               Batches: 1  Memory Usage: 157kB
               Buffers: shared hit=189269
               ->  Nested Loop  (cost=2506.00..283999.87 rows=37983 width=78) (actual time=18.675..7853.998 rows=1438646 loops=1)
                     Buffers: shared hit=189269
                     ->  Nested Loop  (cost=2505.85..282961.24 rows=37994 width=60) (actual time=18.653..6192.499 rows=1438697 loops=1)
                           Buffers: shared hit=189213
                           ->  Nested Loop  (cost=2505.70..282033.62 rows=38007 width=33) (actual time=18.640..5012.634 rows=1438768 loops=1)
                                 Buffers: shared hit=189173
                                 ->  Hash Join  (cost=2505.56..281128.01 rows=38024 width=20) (actual time=18.620..3730.182 rows=1438925 loops=1)
                                       Hash Cond: (web_sales.ws_ship_date_sk = date_dim.d_date_sk)
                                       Buffers: shared hit=189153
                                       ->  Seq Scan on web_sales  (cost=0.00..259726.89 rows=7197889 width=20) (actual time=0.016..1085.754 rows=7197566 loops=1)
                                             Buffers: shared hit=187748
                                       ->  Hash  (cost=2500.73..2500.73 rows=386 width=4) (actual time=18.567..18.568 rows=365 loops=1)
                                             Buckets: 1024  Batches: 1  Memory Usage: 21kB
                                             Buffers: shared hit=1405
                                             ->  Seq Scan on date_dim  (cost=0.00..2500.73 rows=386 width=4) (actual time=9.578..18.463 rows=365 loops=1)
                                                   Filter: ((d_month_seq >= 1217) AND (d_month_seq <= 1228))
                                                   Rows Removed by Filter: 72684
                                                   Buffers: shared hit=1405
                                 ->  Result Cache  (cost=0.15..0.16 rows=1 width=21) (actual time=0.000..0.000 rows=1 loops=1438925)
                                       Cache Key: web_sales.ws_warehouse_sk
                                       Hits: 1438914  Misses: 11  Evictions: 0  Overflows: 0  Memory Usage: 2kB
                                       Buffers: shared hit=20
                                       ->  Index Scan using warehouse_pkey on warehouse  (cost=0.14..0.15 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=11)
                                             Index Cond: (w_warehouse_sk = web_sales.ws_warehouse_sk)
                                             Buffers: shared hit=20
                           ->  Result Cache  (cost=0.15..0.17 rows=1 width=35) (actual time=0.000..0.000 rows=1 loops=1438768)
                                 Cache Key: web_sales.ws_ship_mode_sk
                                 Hits: 1438747  Misses: 21  Evictions: 0  Overflows: 0  Memory Usage: 3kB
                                 Buffers: shared hit=40
                                 ->  Index Scan using ship_mode_pkey on ship_mode  (cost=0.14..0.16 rows=1 width=35) (actual time=0.002..0.002 rows=1 loops=21)
                                       Index Cond: (sm_ship_mode_sk = web_sales.ws_ship_mode_sk)
                                       Buffers: shared hit=40
                     ->  Result Cache  (cost=0.15..0.17 rows=1 width=11) (actual time=0.000..0.000 rows=1 loops=1438697)
                           Cache Key: web_sales.ws_web_site_sk
                           Hits: 1438668  Misses: 29  Evictions: 0  Overflows: 0  Memory Usage: 4kB
                           Buffers: shared hit=56
                           ->  Index Scan using web_site_pkey on web_site  (cost=0.14..0.16 rows=1 width=11) (actual time=0.003..0.003 rows=1 loops=29)
                                 Index Cond: (web_site_sk = web_sales.ws_web_site_sk)
                                 Buffers: shared hit=56
 Planning:
   Buffers: shared hit=323
 Planning Time: 2.273 ms
 Execution Time: 9963.264 ms
(53 rows)

