explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SCYy

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,265.843 ↓ 0.0 0 1

Unique (cost=35,029.41..35,029.44 rows=5 width=8) (actual time=2,265.843..2,265.843 rows=0 loops=1)

2. 0.026 2,265.843 ↓ 0.0 0 1

Sort (cost=35,029.41..35,029.42 rows=5 width=8) (actual time=2,265.843..2,265.843 rows=0 loops=1)

  • Sort Key: e.ev_id
  • Sort Method: quicksort Memory: 25kB
3. 100.727 2,265.817 ↓ 0.0 0 1

Hash Join (cost=169.75..35,029.35 rows=5 width=8) (actual time=2,265.817..2,265.817 rows=0 loops=1)

  • Hash Cond: (lower(""left""((cv.value)::text, 200)) = (lower((retrieve_person_linked_recipients.target_name)::text)))
4. 57.957 2,148.323 ↓ 51.6 144,790 1

Merge Join (cost=168.35..35,019.89 rows=2,804 width=141) (actual time=0.125..2,148.323 rows=144,790 loops=1)

  • Merge Cond: (c.comm_ev_id = e.ev_id)
5. 0.000 1,804.474 ↓ 43.8 144,793 1

Nested Loop (cost=1.42..501,770.77 rows=3,305 width=141) (actual time=0.089..1,804.474 rows=144,793 loops=1)

6. 34.008 1,095.446 ↓ 43.6 142,839 1

Nested Loop (cost=0.98..492,097.70 rows=3,274 width=16) (actual time=0.071..1,095.446 rows=142,839 loops=1)

7. 204.404 204.404 ↓ 1.0 142,839 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.026..204.404 rows=142,839 loops=1)

8. 857.034 857.034 ↑ 1.0 1 142,839

Index Scan using idx_comm_fld_name on comm_flds cf (cost=0.56..2.96 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=142,839)

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
9. 714.195 714.195 ↑ 1.0 1 142,839

Index Scan using idx_comm_values1 on comm_values cv (cost=0.44..2.94 rows=1 width=141) (actual time=0.004..0.005 rows=1 loops=142,839)

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
10. 285.892 285.892 ↓ 1.1 142,836 1

Index Scan using evs_pk on evs e (cost=0.42..16,327.10 rows=127,865 width=8) (actual time=0.031..285.892 rows=142,836 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
11. 0.003 16.767 ↑ 12.5 2 1

Hash (cost=1.09..1.09 rows=25 width=32) (actual time=16.767..16.767 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.007 16.764 ↑ 12.5 2 1

HashAggregate (cost=0.53..0.84 rows=25 width=32) (actual time=16.763..16.764 rows=2 loops=1)

  • Group Key: lower((retrieve_person_linked_recipients.target_name)::text)
13. 16.757 16.757 ↑ 12.5 2 1

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.46 rows=25 width=32) (actual time=16.755..16.757 rows=2 loops=1)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
Planning time : 5.174 ms
Execution time : 2,266.560 ms