explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S1z

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 112,837.900 ↑ 49.5 81 1

Unique (cost=352,964.30..352,984.34 rows=4,008 width=8) (actual time=112,837.882..112,837.900 rows=81 loops=1)

2. 0.264 112,837.886 ↑ 49.5 81 1

Sort (cost=352,964.30..352,974.32 rows=4,008 width=8) (actual time=112,837.881..112,837.886 rows=81 loops=1)

  • Sort Key: e.ev_id
  • Sort Method: quicksort Memory: 28kB
3. 1,123.687 112,837.622 ↑ 49.5 81 1

Hash Semi Join (cost=2.70..352,724.45 rows=4,008 width=8) (actual time=1,104.230..112,837.622 rows=81 loops=1)

  • Hash Cond: (lower(""left""((cv.value)::text, 200)) = lower((retrieve_person_linked_recipients.target_name)::text))
4. 727.118 111,696.336 ↓ 130.7 1,047,507 1

Nested Loop (cost=1.98..352,641.57 rows=8,017 width=125) (actual time=16.464..111,696.336 rows=1,047,507 loops=1)

5. 544.935 49,079.618 ↓ 105.4 773,620 1

Nested Loop (cost=1.42..314,375.49 rows=7,338 width=16) (actual time=16.440..49,079.618 rows=773,620 loops=1)

6. 391.557 6,759.203 ↓ 11.1 773,620 1

Merge Join (cost=0.85..106,646.58 rows=69,570 width=16) (actual time=16.375..6,759.203 rows=773,620 loops=1)

  • Merge Cond: (e.ev_id = c.comm_ev_id)
7. 2,251.904 2,251.904 ↓ 1.0 773,620 1

Index Scan using evs_arc_pk on evs_arc e (cost=0.42..97,196.12 rows=738,009 width=8) (actual time=0.131..2,251.904 rows=773,620 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: 1436
8. 4,115.742 4,115.742 ↑ 1.0 775,056 1

Index Only Scan Backward using comm_arc_comm_ev_id_comm_id_pidx on comm_arc c (cost=0.42..71,278.90 rows=808,215 width=16) (actual time=16.234..4,115.742 rows=775,056 loops=1)

  • Heap Fetches: 322829
9. 41,775.480 41,775.480 ↑ 3.0 1 773,620

Index Scan using idx_comm_fld_arc_name on comm_flds_arc cf (cost=0.57..2.96 rows=3 width=16) (actual time=0.053..0.054 rows=1 loops=773,620)

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
10. 61,889.600 61,889.600 ↑ 15.0 1 773,620

Index Scan using comm_values_arc_pk on comm_values_arc cv (cost=0.57..5.06 rows=15 width=125) (actual time=0.078..0.080 rows=1 loops=773,620)

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
11. 0.152 17.599 ↓ 1.2 29 1

Hash (cost=0.40..0.40 rows=25 width=32) (actual time=17.599..17.599 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 17.447 17.447 ↓ 1.2 29 1

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.40 rows=25 width=32) (actual time=17.441..17.447 rows=29 loops=1)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
Planning time : 1,063.618 ms
Execution time : 112,839.406 ms