explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K9UQO

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 1,933.882 ↑ 1.0 100 1

Limit (cost=57,201.58..57,482.31 rows=100 width=2,275) (actual time=1,928.751..1,933.882 rows=100 loops=1)

2. 0.123 1,933.851 ↑ 3,480.8 100 1

Nested Loop Left Join (cost=57,201.58..1,034,403.29 rows=348,084 width=2,275) (actual time=1,928.749..1,933.851 rows=100 loops=1)

3. 0.109 1,933.428 ↑ 3,480.8 100 1

Nested Loop Left Join (cost=57,201.15..767,410.72 rows=348,084 width=2,249) (actual time=1,928.716..1,933.428 rows=100 loops=1)

4. 0.163 1,932.619 ↑ 3,480.8 100 1

Nested Loop Left Join (cost=57,200.73..588,725.02 rows=348,084 width=2,168) (actual time=1,928.690..1,932.619 rows=100 loops=1)

5. 0.053 1,931.656 ↑ 3,480.8 100 1

Nested Loop Left Join (cost=57,200.30..222,965.26 rows=348,084 width=330) (actual time=1,928.662..1,931.656 rows=100 loops=1)

  • Filter: ((runtimeeve0_.application_id IS NULL) OR (applicatio4_.application_id IS NULL) OR ((applicatio4_.name)::text <> ALL ('{""Voice Recording Notifications"",""Error Response Notifications"",""User Upload Onboarding Notifications"",""Data Upload Notifications""}'::text[])))
6. 38.750 1,931.403 ↑ 4,573.2 100 1

Index Scan Backward using idx_evs_cdate on evs runtimeeve0_ (cost=57,200.16..144,315.19 rows=457,320 width=330) (actual time=1,928.618..1,931.403 rows=100 loops=1)

  • Filter: ((dmn_name IS NOT NULL) AND ((status)::text <> 'SUPPRESSED'::text) AND ((system_message_type IS NULL) OR ((system_message_type)::text = 'SYSTEM_MESSAGE'::text)) AND (company_id = 1) AND ((hashed SubPlan 1) OR (hashed SubPlan 2)) AND ((status)::text = ANY ('{SUPPRESSED,TERMINATED_WITH_ERR,TERMINATED_EXTERNAL,SUSPENDED,TERMINATED,TERMINATED_BY_USER,TERMINATED_EXT_PASSFILL,TERMINATED_PASSFILL,CREATE,TERMINATED_EXT_FAILFILL,PURGED,ACTIVE,TERMINATED_FAILFILL}'::text[])))
  • Rows Removed by Filter: 1848
7.          

SubPlan (for Index Scan Backward)

8. 606.613 606.613 ↓ 0.0 0 1

Seq Scan on evs runtimeeve5_ (cost=0.00..57,038.60 rows=3,081 width=8) (actual time=606.612..606.613 rows=0 loops=1)

  • Filter: ((dmn_name IS NOT NULL) AND ((status)::text <> 'SUPPRESSED'::text) AND (company_id = 1) AND (lower((sender)::text) = 'amunster'::text) AND ((status)::text = ANY ('{SUPPRESSED,TERMINATED_WITH_ERR,TERMINATED_EXTERNAL,SUSPENDED,TERMINATED,TERMINATED_BY_USER,TERMINATED_EXT_PASSFILL,TERMINATED_PASSFILL,CREATE,TERMINATED_EXT_FAILFILL,PURGED,ACTIVE,TERMINATED_FAILFILL}'::text[])))
  • Rows Removed by Filter: 658604
9. 30.123 1,286.040 ↓ 57,138.0 57,138 1

Nested Loop (cost=2.14..153.43 rows=1 width=8) (actual time=30.267..1,286.040 rows=57,138 loops=1)

10. 0.000 913.089 ↓ 57,138.0 57,138 1

Nested Loop (cost=1.71..152.66 rows=1 width=8) (actual time=30.196..913.089 rows=57,138 loops=1)

11. 25.750 460.784 ↓ 1,526.4 114,480 1

Nested Loop (cost=1.28..118.40 rows=75 width=8) (actual time=30.159..460.784 rows=114,480 loops=1)

12. 0.110 30.080 ↓ 79.0 79 1

HashAggregate (cost=0.47..0.48 rows=1 width=32) (actual time=30.021..30.080 rows=79 loops=1)

  • Group Key: lower((retrieve_person_linked_recipients.target_name)::text)
13. 29.970 29.970 ↓ 138.0 138 1

Function Scan on retrieve_person_linked_recipients (cost=0.03..0.47 rows=1 width=32) (actual time=29.851..29.970 rows=138 loops=1)

  • Filter: ((org_id = 1) AND ((recipient_cat)::text = 'GROUP'::text) AND ((grp_association)::text = 'supervisor'::text))
  • Rows Removed by Filter: 6
14. 404.954 404.954 ↓ 19.3 1,449 79

Index Scan using idx_comm_values0 on comm_values cv (cost=0.81..117.16 rows=75 width=128) (actual time=0.027..5.126 rows=1,449 loops=79)

  • Index Cond: (lower(""left""((value)::text, 200)) = (lower((retrieve_person_linked_recipients.target_name)::text)))
15. 457.920 457.920 ↓ 0.0 0 114,480

Index Scan using comm_flds_fld_id_persons_pidx on comm_flds cf (cost=0.42..0.46 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=114,480)

  • Index Cond: (comm_fld_id = cv.comm_fld_id)
16. 342.828 342.828 ↑ 1.0 1 57,138

Index Scan using comm_pk on comm c (cost=0.43..0.78 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=57,138)

  • Index Cond: (comm_id = cf.comm_id)
  • Filter: ((comm_ev_id IS NOT NULL) AND ((comm_type)::text = 'EVENT'::text))
17. 0.200 0.200 ↑ 1.0 1 100

Index Scan using application_pk on application applicatio4_ (cost=0.14..0.16 rows=1 width=27) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (runtimeeve0_.application_id = application_id)
18. 0.800 0.800 ↑ 1.0 1 100

Index Scan using ev_metadata_uc_ev_id on ev_metadata runtimeeve1_ (cost=0.42..1.05 rows=1 width=1,838) (actual time=0.008..0.008 rows=1 loops=100)

  • Index Cond: (runtimeeve0_.ev_id = ev_id)
19. 0.700 0.700 ↑ 1.0 1 100

Index Scan using evs_email_message_ev_id_uc on evs_email_message runtimeeve2_ (cost=0.42..0.51 rows=1 width=81) (actual time=0.007..0.007 rows=1 loops=100)

  • Index Cond: (runtimeeve0_.ev_id = ev_id)
20. 0.300 0.300 ↑ 1.0 1 100

Index Scan using comm_comm_ev_id_uidx on comm runtimeeve3_ (cost=0.42..0.77 rows=1 width=26) (actual time=0.003..0.003 rows=1 loops=100)

  • Index Cond: (runtimeeve0_.ev_id = comm_ev_id)
  • Filter: ((comm_type)::text = 'EVENT'::text)
Planning time : 14.491 ms
Execution time : 1,935.374 ms