explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XADq : Optimization for: Optimization for: plan #5E6t; plan #CYP4

Settings

Optimization path:

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

HashAggregate (cost=11,452,913,155,674.79..11,452,913,236,838.60 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=11,283,026,050,459.20..11,452,913,061,484.07 rows=651,346 width=12) (actual rows= loops=)

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

HashAggregate (cost=11,283,026,050,459.20..11,452,912,957,268.73 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..11,147,116,676,123.81 rows=3,397,734,358,385 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..1,904,290,707.36 rows=13,590,937,434 width=30) (actual rows= loops=)

  • Hash Cond: persons_pii.legacy_id::bigint = "inner"."?column4?
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
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: "?column4?
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=)