explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r1ZM

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 3,622.076 ↓ 0.0 0 1

Unique (cost=165.65..36,832.83 rows=14 width=8) (actual time=3,622.076..3,622.076 rows=0 loops=1)

2. 94.549 3,622.075 ↓ 0.0 0 1

Nested Loop Semi Join (cost=165.65..36,832.79 rows=14 width=8) (actual time=3,622.075..3,622.075 rows=0 loops=1)

  • Join Filter: ((cv.value)::text ~~* (retrieve_person_linked_recipients.target_name)::text)
3. 99.742 3,527.526 ↓ 51.4 145,112 1

Merge Join (cost=165.62..34,900.84 rows=2,823 width=141) (actual time=0.324..3,527.526 rows=145,112 loops=1)

  • Merge Cond: (c.comm_ev_id = e.ev_id)
4. 175.924 2,994.704 ↓ 43.9 145,115 1

Nested Loop (cost=1.42..501,770.77 rows=3,305 width=141) (actual time=0.213..2,994.704 rows=145,115 loops=1)

5. 60.681 1,816.723 ↓ 43.7 143,151 1

Nested Loop (cost=0.98..492,097.70 rows=3,274 width=16) (actual time=0.154..1,816.723 rows=143,151 loops=1)

6. 324.532 324.532 ↓ 1.0 143,151 1

Index Scan using comm_comm_ev_id_pidx on comm c (cost=0.42..70,288.41 rows=142,041 width=16) (actual time=0.067..324.532 rows=143,151 loops=1)

7. 1,431.510 1,431.510 ↑ 1.0 1 143,151

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

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
8. 1,002.057 1,002.057 ↑ 1.0 1 143,151

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

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
9. 433.080 433.080 ↓ 1.2 143,148 1

Index Scan using evs_pk on evs e (cost=0.42..16,070.43 rows=122,180 width=8) (actual time=0.086..433.080 rows=143,148 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
10. 0.000 0.000 ↓ 0.0 0 145,112

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.40 rows=25 width=32) (actual time=0.000..0.000 rows=0 loops=145,112)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
Planning time : 8.590 ms
Execution time : 3,622.985 ms