explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YuwT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=2,834,414,533,537.09..2,834,419,653,685.83 rows=1 width=280) (actual rows= loops=)

  • Hash Cond: (("outer".ship_date = "inner".cal_day_date) AND ("outer".marketplace_id = ("inner".marketplace_id)::numeric))
2. 0.000 0.000 ↓ 0.0

XN Subquery Scan units (cost=1,398,451,749,792.64..1,398,451,749,842.22 rows=2,833 width=63) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=1,398,451,749,792.64..1,398,451,749,813.89 rows=2,833 width=23) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_BOTH (cost=487,874.56..1,398,451,748,890.38 rows=120,302 width=23) (actual rows= loops=)

  • Outer Dist Key: fsun.ordering_customer_id
  • Inner Dist Key: dim_ab_customers.amazon_account_skey
  • Hash Cond: (("outer".ordering_customer_id = "inner".amazon_account_skey) AND ("outer".marketplace_id = ("inner".marketplace_id)::numeric))
  • Join Filter: ((trunc(("outer".ship_day)::timestamp without time zone) <= trunc("inner".effective_end_date)) AND (trunc(("outer".ship_day)::timestamp without time zone) >= trunc("inner".effective_start_date)))
5. 0.000 0.000 ↓ 0.0

XN Seq Scan on d_ab_unified_cust_ship_items fsun (cost=0.00..10,023,737.92 rows=190,928,342 width=36) (actual rows= loops=)

  • Filter: ('2019-06-01'::date <= trunc((ship_day)::timestamp without time zone))
6. 0.000 0.000 ↓ 0.0

XN Hash (cost=425,522.97..425,522.97 rows=12,470,318 width=33) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

XN Seq Scan on dim_ab_customers (cost=0.00..425,522.97 rows=12,470,318 width=33) (actual rows= loops=)

  • Filter: (((is_active_now)::text = 'Y'::text) AND ((is_business_account_active)::text = 'Y'::text) AND (is_internal_business_account = 0))
8. 0.000 0.000 ↓ 0.0

XN Hash (cost=1,435,962,783,744.44..1,435,962,783,744.44 rows=2 width=248) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

XN Subquery Scan contacts_agg (cost=1,435,962,783,744.38..1,435,962,783,744.44 rows=2 width=248) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=1,435,962,783,744.38..1,435,962,783,744.42 rows=2 width=192) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

XN Subquery Scan contacts_raw (cost=1,435,962,783,651.08..1,435,962,783,744.14 rows=9 width=192) (actual rows= loops=)

  • Filter: (rn = 1)
12. 0.000 0.000 ↓ 0.0

XN Window (cost=1,435,962,783,651.08..1,435,962,783,722.99 rows=1,692 width=162) (actual rows= loops=)

  • Partition: dim_ab_customers.amazon_account_skey, dim_ab_customers.marketplace_id
  • Order: dim_ab_customers.business_registration_date
13. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,435,962,783,651.08..1,435,962,783,655.31 rows=1,692 width=162) (actual rows= loops=)

  • Sort Key: dim_ab_customers.amazon_account_skey, dim_ab_customers.marketplace_id, dim_ab_customers.business_registration_date
14. 0.000 0.000 ↓ 0.0

XN Network (cost=338,209,343,802.79..435,962,783,560.35 rows=1,692 width=162) (actual rows= loops=)

  • Distribute
15. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=338,209,343,802.79..435,962,783,560.35 rows=1,692 width=162) (actual rows= loops=)

  • Hash Cond: (("outer".amazon_account_skey = ("inner".customer_id)::numeric) AND ("outer".marketplace_id = "inner".marketplace_skey))
  • Join Filter: (("inner".comm_creation_day_lcl_skey <= (to_char("outer".effective_end_date, 'YYYYMMDD'::text))::integer) AND (trunc("outer".business_registration_date) <= trunc("inner".comm_creation_day_lcl)) AND ("inner".comm_creation_day_lcl_skey >= (to_char("outer".effective_start_date, 'YYYYMMDD'::text))::integer))
16. 0.000 0.000 ↓ 0.0

XN Seq Scan on dim_ab_customers (cost=0.00..425,522.97 rows=12,470,318 width=41) (actual rows= loops=)

  • Filter: (((is_active_now)::text = 'Y'::text) AND ((is_business_account_active)::text = 'Y'::text) AND (is_internal_business_account = 0))
17. 0.000 0.000 ↓ 0.0

XN Hash (cost=338,209,343,511.41..338,209,343,511.41 rows=58,276 width=153) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=37,170,106.73..338,209,343,511.41 rows=58,276 width=153) (actual rows= loops=)

  • Hash Cond: ("outer".comm_id = "inner".comm_id)
19. 0.000 0.000 ↓ 0.0

XN Seq Scan on fact_hmd_na hmd (cost=0.00..17,794,033.92 rows=176,732,023 width=65) (actual rows= loops=)

  • Filter: (('2019-06-01'::date <= trunc(comm_creation_day_lcl)) AND (customer_id > 1) AND ((owner_agent_login)::text <> 'drone'::text) AND ((owner_agent_login)::text <> 'cs-arf'::text))
20. 0.000 0.000 ↓ 0.0

XN Hash (cost=37,169,454.80..37,169,454.80 rows=260,773 width=104) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

XN Subquery Scan ct (cost=37,164,891.27..37,169,454.80 rows=260,773 width=104) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=37,164,891.27..37,166,847.07 rows=260,773 width=32) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

XN Seq Scan on fact_contact_skill_na (cost=0.00..22,886,969.60 rows=1,427,792,167 width=32) (actual rows= loops=)

  • Filter: ((direction)::text = 'Inbound'::text)