explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CYP4 : Optimization for: plan #5E6t

Settings

Optimization path:

Optimization(s) for this plan:

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

HashAggregate (cost=7,382,999,043.37..7,383,080,207.17 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 (slice5; segments: 8) (cost=7,273,128,550.73..7,382,904,852.65 rows=651,346 width=12) (actual rows= loops=)

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

HashAggregate (cost=7,273,128,550.73..7,382,800,637.31 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=623,776.80..7,185,541,993.70 rows=2,189,663,926 width=44) (actual rows= loops=)

  • Hash Cond: lower(persons_pii.legacy_id::text) = lower(e.user_id::text)
  • 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

Hash Join (cost=401,291.80..2,785,678.47 rows=8,758,656 width=30) (actual rows= loops=)

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

Redistribute Motion 8:8 (slice2; segments: 8) (cost=154,645.20..1,200,805.25 rows=2,608,242 width=14) (actual rows= loops=)

  • Hash Key: persons_pii.legacy_id::bigint::text
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=154,645.20..783,486.65 rows=2,608,242 width=14) (actual rows= loops=)

  • Hash Cond: persons_pii.uid::text = cl.user_uid::text
8. 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=)

9. 0.000 0.000 ↓ 0.0

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

10. 0.000 0.000 ↓ 0.0

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

11. 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=)

12. 0.000 0.000 ↓ 0.0

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

13. 0.000 0.000 ↓ 0.0

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

  • Hash Key: "Companies_pii"."ContactUserID"::text
14. 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=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=101,000.00..101,000.00 rows=1,000,000 width=64) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Broadcast Motion 8:8 (slice4; segments: 8) (cost=0.00..101,000.00 rows=1,000,000 width=64) (actual rows= loops=)

17. 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=)