explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PoBt

Settings
# exclusive inclusive rows x rows loops node
1. 10.450 3,968.271 ↑ 1.7 61 1

Merge Join (cost=165.65..132,341.04 rows=103 width=141) (actual time=159.966..3,968.271 rows=61 loops=1)

  • Merge Cond: (c.comm_ev_id = e.ev_id)
2. 273.163 3,650.610 ↑ 2.0 61 1

Nested Loop Semi Join (cost=1.44..3,507,902.40 rows=121 width=141) (actual time=135.715..3,650.610 rows=61 loops=1)

  • Join Filter: ((cv.value)::text = (retrieve_person_linked_recipients.target_name)::text)
  • Rows Removed by Join Filter: 2465237
3. 59.114 3,087.331 ↓ 1.6 145,058 1

Nested Loop (cost=1.42..3,446,105.06 rows=89,887 width=141) (actual time=0.186..3,087.331 rows=145,058 loops=1)

4. 98.403 1,883.417 ↓ 1.6 143,100 1

Nested Loop (cost=0.98..3,183,041.39 rows=89,038 width=16) (actual time=0.152..1,883.417 rows=143,100 loops=1)

5. 354.014 354.014 ↑ 27.0 143,100 1

Index Scan using comm_comm_ev_id_uidx on comm c (cost=0.42..70,282.40 rows=3,863,308 width=16) (actual time=0.058..354.014 rows=143,100 loops=1)

6. 1,431.000 1,431.000 ↑ 1.0 1 143,100

Index Scan using idx_comm_fld_name on comm_flds cf (cost=0.56..0.80 rows=1 width=16) (actual time=0.010..0.010 rows=1 loops=143,100)

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
7. 1,144.800 1,144.800 ↑ 1.0 1 143,100

Index Scan using idx_comm_values1 on comm_values cv (cost=0.44..2.94 rows=1 width=141) (actual time=0.007..0.008 rows=1 loops=143,100)

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
8. 290.116 290.116 ↑ 1.5 17 145,058

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.40 rows=25 width=32) (actual time=0.001..0.002 rows=17 loops=145,058)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
9. 307.211 307.211 ↓ 1.2 140,528 1

Index Scan using evs_pk on evs e (cost=0.42..16,070.43 rows=122,180 width=8) (actual time=0.050..307.211 rows=140,528 loops=1)

  • Filter: ((dmn_name IS NOT NULL) AND (company_id = 1) AND ((status)::text = ANY ('{TERMINATED_PASSFILL,TERMINATED_EXT_PASSFILL,TERMINATED_WITH_ERR,TERMINATED_EXT_FAILFILL,SUSPENDED,PURGED,ACTIVE,CREATE,TERMINATED_BY_USER,TERMINATED_FAILFILL,TERMINATED_EXTERNAL,TERMINATED,SUPPRESSED}'::text[])))
  • Rows Removed by Filter: 3
Planning time : 10.302 ms
Execution time : 3,969.336 ms