explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5E6t

Settings

Optimization(s) for this plan:

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

HashAggregate (cost=94,754,892.57..94,836,056.37 rows=651,346 width=12) (actual rows= loops=)

  • Group By: "Companies_pii"."Record ID#
2. 0.000 0.000 ↓ 0.0

Redistribute Motion 8:8 (slice6; segments: 8) (cost=86,225,772.77..94,660,701.85 rows=651,346 width=12) (actual rows= loops=)

  • Hash Key: "Companies_pii"."Record ID#
3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=86,225,772.77..94,556,486.51 rows=651,346 width=12) (actual rows= loops=)

  • Group By: "Companies_pii"."Record ID#
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=444,791.80..79,712,314.02 rows=162,836,469 width=44) (actual rows= loops=)

  • Hash Cond: lower(persons_pii.legacy_id::text) = "inner"."?column3?
  • Join Filter: "Companies_pii"."Date Created"::double precision >= 1491512400000::double precision
  • Filter: (NOT cl.num_of_employees IS NULL) OR (NOT e.reg_flow_cny_employee_count IS NULL)
5. 0.000 0.000 ↓ 0.0

Redistribute Motion 8:8 (slice4; segments: 8) (cost=401,291.80..1,494,282.10 rows=651,346 width=30) (actual rows= loops=)

  • Hash Key: lower(persons_pii.legacy_id::text)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=401,291.80..1,390,066.76 rows=651,346 width=30) (actual rows= loops=)

  • Hash Cond: persons_pii.uid::text = cl.user_uid::text
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=246,646.60..1,135,355.91 rows=651,346 width=45) (actual rows= loops=)

  • Hash Cond: persons_pii.legacy_id::text = "Companies_pii"."ContactUserID"::text
8. 0.000 0.000 ↓ 0.0

Redistribute Motion 8:8 (slice1; segments: 8) (cost=0.00..691,183.90 rows=2,608,242 width=29) (actual rows= loops=)

  • Hash Key: persons_pii.legacy_id::text
9. 0.000 0.000 ↓ 0.0

External Scan on persons_pii (cost=0.00..273,865.30 rows=2,608,242 width=29) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=172,606.01..172,606.01 rows=651,346 width=25) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Redistribute Motion 8:8 (slice2; segments: 8) (cost=0.00..172,606.01 rows=651,346 width=25) (actual rows= loops=)

  • Hash Key: "Companies_pii"."ContactUserID"::text
12. 0.000 0.000 ↓ 0.0

External Scan on "Companies_pii" (cost=0.00..68,390.67 rows=651,346 width=25) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=74,229.10..74,229.10 rows=719,801 width=23) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Broadcast Motion 8:8 (slice3; segments: 8) (cost=0.00..74,229.10 rows=719,801 width=23) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

External Scan on user_classification cl (cost=0.00..9,447.01 rows=89,976 width=23) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=31,000.00..31,000.00 rows=125,000 width=64) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Redistribute Motion 8:8 (slice5; segments: 8) (cost=0.00..31,000.00 rows=125,000 width=64) (actual rows= loops=)

  • Hash Key: "?column3?
18. 0.000 0.000 ↓ 0.0

External Scan on evt_user e (cost=0.00..11,000.00 rows=125,000 width=64) (actual rows= loops=)