QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=2816266.54..2816267.79 rows=100 width=110) (actual time=59613.454..59613.473 rows=100 loops=1) -> Sort (cost=2816266.54..2816267.38 rows=336 width=110) (actual time=59613.453..59613.464 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 -> HashAggregate (cost=2816248.24..2816252.44 rows=336 width=110) (actual time=59612.622..59612.730 rows=360 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 -> Hash Join (cost=2510.74..2794150.54 rows=368295 width=78) (actual time=7.597..45818.495 rows=14336926 loops=1) Hash Cond: (web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk) -> Hash Join (cost=2509.29..2792056.55 rows=368356 width=36) (actual time=7.571..38820.092 rows=14337390 loops=1) Hash Cond: (web_sales.ws_web_site_sk = web_site.web_site_sk) -> Hash Join (cost=2506.75..2790916.14 rows=368430 width=33) (actual time=7.554..35314.217 rows=14338265 loops=1) Hash Cond: (web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk) -> Hash Join (cost=2505.41..2789674.19 rows=368516 width=20) (actual time=7.544..31214.782 rows=14340028 loops=1) Hash Cond: (web_sales.ws_ship_date_sk = date_dim.d_date_sk) -> Seq Scan on web_sales (cost=0.00..2598153.08 rows=72001808 width=20) (actual time=0.026..17405.391 rows=72001237 loops=1) -> Hash (cost=2500.73..2500.73 rows=374 width=4) (actual time=7.505..7.506 rows=365 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 21kB -> Seq Scan on date_dim (cost=0.00..2500.73 rows=374 width=4) (actual time=3.599..7.462 rows=365 loops=1) Filter: ((d_month_seq >= 1212) AND (d_month_seq <= 1223)) Rows Removed by Filter: 72684 -> Hash (cost=1.15..1.15 rows=15 width=21) (actual time=0.007..0.007 rows=15 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 9kB -> Seq Scan on warehouse (cost=0.00..1.15 rows=15 width=21) (actual time=0.003..0.004 rows=15 loops=1) -> Hash (cost=2.24..2.24 rows=24 width=11) (actual time=0.011..0.012 rows=24 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 10kB -> Seq Scan on web_site (cost=0.00..2.24 rows=24 width=11) (actual time=0.004..0.008 rows=24 loops=1) -> Hash (cost=1.20..1.20 rows=20 width=35) (actual time=0.021..0.021 rows=20 loops=1) Buckets: 1024 Batches: 1 Memory Usage: 10kB -> Seq Scan on ship_mode (cost=0.00..1.20 rows=20 width=35) (actual time=0.006..0.009 rows=20 loops=1) Planning Time: 0.950 ms Execution Time: 59613.803 ms (32 rows) Time: 59615.490 ms (00:59.615)