explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6DpB

Settings
# exclusive inclusive rows x rows loops node
1. 0.164 38,128.985 ↓ 9.5 1,210 1

Unique (cost=263,128.34..263,128.98 rows=128 width=8) (actual time=38,128.745..38,128.985 rows=1,210 loops=1)

2. 3.209 38,128.821 ↓ 9.5 1,210 1

Sort (cost=263,128.34..263,128.66 rows=128 width=8) (actual time=38,128.744..38,128.821 rows=1,210 loops=1)

  • Sort Key: e.ev_id
  • Sort Method: quicksort Memory: 105kB
3. 3.332 38,125.612 ↓ 9.5 1,210 1

Nested Loop (cost=2.71..263,123.86 rows=128 width=8) (actual time=138.449..38,125.612 rows=1,210 loops=1)

4. 3.305 38,035.160 ↓ 9.4 1,210 1

Nested Loop (cost=2.28..263,053.08 rows=129 width=8) (actual time=138.374..38,035.160 rows=1,210 loops=1)

5. 22.514 37,968.935 ↑ 1.1 1,210 1

Nested Loop (cost=1.85..262,005.63 rows=1,373 width=8) (actual time=138.318..37,968.935 rows=1,210 loops=1)

6. 6.799 23,243.739 ↑ 25.6 4,838 1

Nested Loop (cost=1.28..186,543.69 rows=124,090 width=8) (actual time=138.203..23,243.739 rows=4,838 loops=1)

7. 0.015 93.680 ↑ 8.3 3 1

HashAggregate (cost=0.46..0.71 rows=25 width=32) (actual time=93.674..93.680 rows=3 loops=1)

  • Group Key: lower((retrieve_person_linked_recipients.target_name)::text)
8. 93.665 93.665 ↑ 8.3 3 1

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.40 rows=25 width=32) (actual time=93.658..93.665 rows=3 loops=1)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
9. 23,143.260 23,143.260 ↑ 3.1 1,613 3

Index Scan using idx_comm_values0 on comm_values cv (cost=0.82..7,412.08 rows=4,964 width=125) (actual time=24.854..7,714.420 rows=1,613 loops=3)

  • Index Cond: (lower(""left""((value)::text, 200)) = lower((retrieve_person_linked_recipients.target_name)::text))
10. 14,702.682 14,702.682 ↓ 0.0 0 4,838

Index Scan using comm_flds_pk on comm_flds cf (cost=0.56..0.61 rows=1 width=16) (actual time=3.039..3.039 rows=0 loops=4,838)

  • Index Cond: (comm_fld_id = cv.comm_fld_id)
  • Filter: ((name)::text = 'recipients'::text)
  • Rows Removed by Filter: 1
11. 62.920 62.920 ↑ 1.0 1 1,210

Index Scan using comm_pk on comm c (cost=0.43..0.76 rows=1 width=16) (actual time=0.052..0.052 rows=1 loops=1,210)

  • Index Cond: (comm_id = cf.comm_id)
  • Filter: ((comm_type)::text = 'EVENT'::text)
12. 87.120 87.120 ↑ 1.0 1 1,210

Index Scan using evs_pk on evs e (cost=0.42..0.55 rows=1 width=8) (actual time=0.072..0.072 rows=1 loops=1,210)

  • Index Cond: (ev_id = c.comm_ev_id)
  • Filter: (company_id = 1)
Planning time : 5.887 ms
Execution time : 38,129.866 ms