explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CfKp : 2020 Territories with NVL

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

XN HashAggregate (cost=287,652,893,902.37..287,653,206,474.70 rows=961,761 width=274) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_BCAST_INNER (cost=63,275,812,782.01..287,652,860,240.74 rows=961,761 width=274) (actual rows= loops=)

  • Hash Cond: (("outer".marketplace_id)::numeric = "inner".marketplace_id)
3. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=63,275,812,781.95..287,650,930,597.08 rows=961,761 width=260) (actual rows= loops=)

  • Outer Dist Key: masa.account_id
  • Inner Dist Key: cust.account_id
  • Hash Cond: (("outer".account_id)::text = ("inner".account_id)::text)
  • Filter: ((((COALESCE("inner".vertical, "inner".vertical))::text <> 'Edu'::text) AND ((COALESCE("inner".vertical, "inner".vertical))::text <> 'Gov'::text)) OR ("inner".marketplace_id <> 3) OR (("outer".account_owner_name)::text <> 'Informatica API User'::text))
4. 0.000 0.000 ↓ 0.0

XN Seq Scan on m_ab_sales_accounts masa (cost=0.00..96,176.03 rows=9,617,603 width=105) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Hash (cost=63,275,811,780.56..63,275,811,780.56 rows=400,553 width=222) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_BCAST_INNER (cost=2,642,163.14..63,275,811,780.56 rows=400,553 width=222) (actual rows= loops=)

  • Hash Cond: (("outer".hq_18_digit_account_id)::text = ("inner".account_id_18_digit)::text)
7. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_OUTER (cost=2,642,048.64..58,512,605,675.82 rows=400,553 width=200) (actual rows= loops=)

  • Outer Dist Key: "outer".business_account_id
  • Hash Cond: (("outer".business_account_id)::text = ("inner".business_account_id)::text)
8. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_OUTER (cost=2,627,053.59..45,995,296,418.09 rows=400,553 width=192) (actual rows= loops=)

  • Outer Dist Key: "inner".account_join_key
  • Hash Cond: ("outer".account_join_key = "inner".account_join_key)
9. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=74,776.66..33,184,107,113.52 rows=400,553 width=189) (actual rows= loops=)

  • Outer Dist Key: hq.hq_18_digit_account_id
  • Inner Dist Key: cust.hq_18_digit_account_id
  • Hash Cond: (("outer".hq_18_digit_account_id)::text = ("inner".hq_18_digit_account_id)::text)
  • Filter: (((COALESCE("inner".vertical, "outer".vertical))::text <> 'Edu'::text) OR ("inner".marketplace_id <> 44551) OR ("inner".hq_18_digit_account_id IS NOT NULL))
10. 0.000 0.000 ↓ 0.0

XN Seq Scan on hq_attributes hq (cost=0.00..40,014.95 rows=3,051,393 width=58) (actual rows= loops=)

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

XN Hash (cost=74,742.68..74,742.68 rows=13,590 width=153) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

XN Seq Scan on abi_cust_cube_customers cust (cost=0.00..74,742.68 rows=13,590 width=153) (actual rows= loops=)

  • Filter: ((COALESCE((business_active)::integer, 1) = 1) AND ((marketplace_id = 4) OR (marketplace_id = 3) OR (marketplace_id = 35691) OR (marketplace_id = 5) OR (marketplace_id = 44551)))
13. 0.000 0.000 ↓ 0.0

XN Hash (cost=2,550,693.44..2,550,693.44 rows=633,397 width=19) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

XN Seq Scan on abi_cust_cube_ops ops (cost=0.00..2,550,693.44 rows=633,397 width=19) (actual rows= loops=)

  • Filter: ((pgdate_part('year'::text, (order_day)::timestamp without time zone) = 2019::double precision) AND (gl_product_group <> 228))
15. 0.000 0.000 ↓ 0.0

XN Hash (cost=11,996.04..11,996.04 rows=1,199,604 width=25) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

XN Seq Scan on new_users n_users (cost=0.00..11,996.04 rows=1,199,604 width=25) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

XN Hash (cost=91.60..91.60 rows=9,160 width=44) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

XN Seq Scan on similar_hqs sihq (cost=0.00..91.60 rows=9,160 width=44) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

XN Hash (cost=0.05..0.05 rows=5 width=24) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

XN Seq Scan on fx_corrections fx (cost=0.00..0.05 rows=5 width=24) (actual rows= loops=)