                                                                            QUERY PLAN                                                                            
------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=283900.54..283900.79 rows=100 width=110) (actual time=8219.029..8219.054 rows=100 loops=1)
   Buffers: shared hit=189164
   ->  Sort  (cost=283900.54..283901.48 rows=378 width=110) (actual time=8219.026..8219.040 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=189164
         ->  HashAggregate  (cost=283881.36..283886.09 rows=378 width=110) (actual time=8218.031..8218.220 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=189158
               ->  Hash Join  (cost=2512.18..281602.38 rows=37983 width=78) (actual time=18.222..6147.892 rows=1438646 loops=1)
                     Hash Cond: (web_sales.ws_web_site_sk = web_site.web_site_sk)
                     Buffers: shared hit=189158
                     ->  Hash Join  (cost=2508.23..281393.69 rows=37994 width=60) (actual time=18.148..5023.384 rows=1438697 loops=1)
                           Hash Cond: (web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)
                           Buffers: shared hit=189155
                           ->  Hash Join  (cost=2506.78..281271.33 rows=38007 width=33) (actual time=18.118..4404.499 rows=1438768 loops=1)
                                 Hash Cond: (web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)
                                 Buffers: shared hit=189154
                                 ->  Hash Join  (cost=2505.56..281128.01 rows=38024 width=20) (actual time=18.095..3730.625 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.006..1056.310 rows=7197566 loops=1)
                                             Buffers: shared hit=187748
                                       ->  Hash  (cost=2500.73..2500.73 rows=386 width=4) (actual time=18.036..18.036 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.077..17.934 rows=365 loops=1)
                                                   Filter: ((d_month_seq >= 1217) AND (d_month_seq <= 1228))
                                                   Rows Removed by Filter: 72684
                                                   Buffers: shared hit=1405
                                 ->  Hash  (cost=1.10..1.10 rows=10 width=21) (actual time=0.010..0.011 rows=10 loops=1)
                                       Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                       Buffers: shared hit=1
                                       ->  Seq Scan on warehouse  (cost=0.00..1.10 rows=10 width=21) (actual time=0.003..0.005 rows=10 loops=1)
                                             Buffers: shared hit=1
                           ->  Hash  (cost=1.20..1.20 rows=20 width=35) (actual time=0.016..0.017 rows=20 loops=1)
                                 Buckets: 1024  Batches: 1  Memory Usage: 10kB
                                 Buffers: shared hit=1
                                 ->  Seq Scan on ship_mode  (cost=0.00..1.20 rows=20 width=35) (actual time=0.003..0.007 rows=20 loops=1)
                                       Buffers: shared hit=1
                     ->  Hash  (cost=3.42..3.42 rows=42 width=11) (actual time=0.061..0.062 rows=42 loops=1)
                           Buckets: 1024  Batches: 1  Memory Usage: 10kB
                           Buffers: shared hit=3
                           ->  Seq Scan on web_site  (cost=0.00..3.42 rows=42 width=11) (actual time=0.008..0.039 rows=42 loops=1)
                                 Buffers: shared hit=3
 Planning:
   Buffers: shared hit=323
 Planning Time: 1.962 ms
 Execution Time: 8219.292 ms
(50 rows)

