explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CAMm

Settings
# exclusive inclusive rows x rows loops node
1. 847.152 13,674.178 ↓ 0.0 0 1

Hash Semi Join (cost=2.71..1,266,898.31 rows=44,669 width=634) (actual time=13,674.178..13,674.178 rows=0 loops=1)

  • Hash Cond: (lower(""left""((cv.value)::text, 200)) = lower((retrieve_person_linked_recipients.target_name)::text))
2. 358.731 12,538.194 ↓ 11.7 1,047,507 1

Nested Loop (cost=2.00..1,265,981.88 rows=89,338 width=634) (actual time=15.477..12,538.194 rows=1,047,507 loops=1)

3. 539.432 7,537.743 ↓ 9.5 773,620 1

Nested Loop (cost=1.43..839,579.52 rows=81,768 width=493) (actual time=15.457..7,537.743 rows=773,620 loops=1)

4. 705.049 2,356.591 ↑ 1.0 773,620 1

Merge Join (cost=0.86..128,059.17 rows=775,179 width=454) (actual time=15.365..2,356.591 rows=773,620 loops=1)

  • Merge Cond: (c.comm_ev_id = e.ev_id)
5. 500.770 500.770 ↑ 11.1 775,057 1

Index Scan using idx_comm_arc_comm_ev_id on comm_arc c (cost=0.43..337,052.19 rows=8,573,706 width=60) (actual time=15.129..500.770 rows=775,057 loops=1)

6. 1,150.772 1,150.772 ↑ 1.0 773,620 1

Index Scan using evs_arc_pk on evs_arc e (cost=0.42..84,577.17 rows=775,179 width=394) (actual time=0.218..1,150.772 rows=773,620 loops=1)

  • Filter: (company_id = 1)
  • Rows Removed by Filter: 1436
7. 4,641.720 4,641.720 ↑ 3.0 1 773,620

Index Scan using idx_comm_fld_arc_name on comm_flds_arc cf (cost=0.57..0.89 rows=3 width=39) (actual time=0.006..0.006 rows=1 loops=773,620)

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
8. 4,641.720 4,641.720 ↑ 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=141) (actual time=0.006..0.006 rows=1 loops=773,620)

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
9. 0.176 288.832 ↑ 6.2 4 1

Hash (cost=0.40..0.40 rows=25 width=32) (actual time=288.832..288.832 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 288.656 288.656 ↑ 6.2 4 1

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.40 rows=25 width=32) (actual time=288.653..288.656 rows=4 loops=1)

  • Filter: (((recipient_cat)::text <> 'GROUP'::text) OR ((grp_association)::text <> 'supervisor'::text))
  • Rows Removed by Filter: 2
Planning time : 1,112.974 ms
Execution time : 13,675.258 ms