explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3pbG

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=12,201.65..12,202.28 rows=255 width=1,298) (actual rows= loops=)

  • Sort Key: aea.creation_date DESC
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=524.84..12,191.45 rows=255 width=1,298) (actual rows= loops=)

  • Hash Cond: ((aea.ntfn_recipient_id = recipient_r.recipient_id) AND (ev.company_id = recipient_r.org_id))
3. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=520.58..547.09 rows=255 width=585) (actual rows= loops=)

  • Merge Cond: (evc.comm_ev_id = ev.ev_id)
4. 0.000 0.000 ↓ 0.0

Index Scan using comm_comm_ev_id_uidx on comm evc (cost=0.28..71.07 rows=2,166 width=16) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=520.31..520.52 rows=85 width=577) (actual rows= loops=)

  • Sort Key: aea.ev_id
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=323.28..517.58 rows=85 width=577) (actual rows= loops=)

  • Hash Cond: (sender_r.recipient_id = sender_p.person_id)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=321.93..515.99 rows=85 width=569) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=321.66..483.89 rows=85 width=351) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=321.38..332.64 rows=100 width=273) (actual rows= loops=)

  • Hash Cond: (conf.id = ev.conference_id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on conferences conf (cost=0.00..10.50 rows=50 width=56) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=320.13..320.13 rows=100 width=225) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=316.88..320.13 rows=100 width=225) (actual rows= loops=)

  • Hash Cond: (((sender_r.target_name_lower)::text = lower((ev.sender)::text)) AND (sender_r.org_id = ev.company_id))
13. 0.000 0.000 ↓ 0.0

Seq Scan on recipients sender_r (cost=0.00..2.67 rows=13 width=27) (actual rows= loops=)

  • Filter: (((recipient_cat)::text = 'PERSON'::text) AND (deleted_id = '-1'::integer))
14. 0.000 0.000 ↓ 0.0

Hash (cost=315.38..315.38 rows=100 width=217) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=57.53..315.38 rows=100 width=217) (actual rows= loops=)

  • Hash Cond: (aea.ev_id = ev.ev_id)
16. 0.000 0.000 ↓ 0.0

Index Scan using audit_evs_all_pk on audit_evs_all aea (cost=0.29..257.87 rows=100 width=49) (actual rows= loops=)

  • Index Cond: (audit_ev_id = ANY ('{45983258125,45979876125,45955739118,45946707117,45943981117,45886914120,45886818120,45880194001,45880139001,45880040133,45879608133,45875640140,45851457125,45849799125,45849120132,45845069001,45845035146,45836046001,45836003083,45835920078,45835425078,45783275124,45783171124,45781146124,45776655001,45776625150,45776173137,45775295001,45775265150,45774427137,45772910001,45772870150,45768587001,45768498159,45760470001,45760437159,45759784144,45754408137,45754295137,45754183137,45739563128,45737758143,45678803116,45677989116,45675115129,45663409001,45663312147,45646896140,45645559129,45641666129,45610987048,45585245048,45570168100,45556665121,45553172121,45549761121,45542817113,45430858039,45359833111,45359730111,45356720124,45356251124,45349944124,45348472001,45348406131,45343621001,45343581124,45335911117,45333731125,45278442132,45267650001,45267563154,45264121132,45256999001,45256926133,45256567124,45253777124,45247054077,45244512054,45244281054,45222251001,45222192050,45207859123,45207817123,45200276001,45200233151,45188108143,45176798128,45175951128,45162742054,45162640054,45122206115,45119446115,45108851142,45077002071,45077001071,45076352071,45075985071,45005053106,45004946115}'::bigint[]))
17. 0.000 0.000 ↓ 0.0

Hash (cost=48.22..48.22 rows=722 width=168) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on evs ev (cost=0.00..48.22 rows=722 width=168) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using ntfn_pk on ntfn n (cost=0.28..1.51 rows=1 width=86) (actual rows= loops=)

  • Index Cond: (ntfn_id = aea.ntfn_id)
20. 0.000 0.000 ↓ 0.0

Index Scan using ev_metadata_uc_ev_id on ev_metadata evm (cost=0.28..0.38 rows=1 width=226) (actual rows= loops=)

  • Index Cond: (ev_id = ev.ev_id)
21. 0.000 0.000 ↓ 0.0

Hash (cost=1.18..1.18 rows=14 width=24) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on persons sender_p (cost=0.00..1.18 rows=14 width=24) (actual rows= loops=)

  • Filter: (deleted_id = '-1'::integer)
23. 0.000 0.000 ↓ 0.0

Hash (cost=4.06..4.06 rows=13 width=43) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.35..4.06 rows=13 width=43) (actual rows= loops=)

  • Hash Cond: (recipient_r.recipient_id = recipient_p.person_id)
25. 0.000 0.000 ↓ 0.0

Seq Scan on recipients recipient_r (cost=0.00..2.67 rows=13 width=27) (actual rows= loops=)

  • Filter: (((recipient_cat)::text = 'PERSON'::text) AND (deleted_id = '-1'::integer))
26. 0.000 0.000 ↓ 0.0

Hash (cost=1.18..1.18 rows=14 width=24) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on persons recipient_p (cost=0.00..1.18 rows=14 width=24) (actual rows= loops=)

  • Filter: (deleted_id = '-1'::integer)
28.          

SubPlan (for Hash Left Join)

29. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.14..22.38 rows=20 width=0) (actual rows= loops=)

  • Join Filter: (enh.enh_msg_id = ema.enh_msg_id)
30. 0.000 0.000 ↓ 0.0

Index Scan using idx_enh_msgs6 on enh_msgs enh (cost=0.14..3.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (ev_id = aea.ev_id)
31. 0.000 0.000 ↓ 0.0

Seq Scan on enh_msg_attachments ema (cost=0.00..14.10 rows=410 width=8) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.45..25.65 rows=410 width=8) (actual rows= loops=)

  • Hash Cond: (ema_1.enh_msg_id = enh_1.enh_msg_id)
33. 0.000 0.000 ↓ 0.0

Seq Scan on enh_msg_attachments ema_1 (cost=0.00..14.10 rows=410 width=8) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Hash (cost=10.20..10.20 rows=20 width=16) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on enh_msgs enh_1 (cost=0.00..10.20 rows=20 width=16) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_comm_fld_name on comm_flds attcf (cost=0.29..3.20 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((comm_id = evc.comm_id) AND (name = 'xappattachments'::text))
37. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name_only on comm_flds attcf_1 (cost=0.29..3.29 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((name)::text = 'xappattachments'::text)
38. 0.000 0.000 ↓ 0.0

Limit (cost=3.31..3.32 rows=1 width=524) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Sort (cost=3.31..3.32 rows=1 width=524) (actual rows= loops=)

  • Sort Key: resp.creation_date DESC
40. 0.000 0.000 ↓ 0.0

Index Scan using idx_audit_evs_all_niaaet on audit_evs_all resp (cost=0.29..3.30 rows=1 width=524) (actual rows= loops=)

  • Index Cond: ((ntfn_id = aea.ntfn_id) AND ((ap_audit_ev_type)::text = 'NOTIFICATION_RECEIVED_RESPONSE'::text))
41. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_audit_evs_all_niaaet on audit_evs_all delink (cost=0.29..1.80 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((ntfn_id = aea.ntfn_id) AND (ap_audit_ev_type = 'DELINK_PERSON_NOTIFICATION'::text))
42. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_audit_evs_all_anpni on audit_evs_all delink_1 (cost=0.41..32.54 rows=722 width=8) (actual rows= loops=)

  • Index Cond: (ap_audit_ev_type = 'DELINK_PERSON_NOTIFICATION'::text)
43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..9.82 rows=1 width=76) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..6.51 rows=1 width=8) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Index Scan using comm_comm_ev_id_uidx on comm (cost=0.28..3.29 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (comm_ev_id = ev.ev_id)
46. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name on comm_flds commf (cost=0.29..3.20 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((comm_id = comm.comm_id) AND ((name)::text = 'xm_emailsenderoverride'::text))
47. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_values1 on comm_values commv (cost=0.29..3.30 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (comm_fld_id = commf.comm_fld_id)
48. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..6.61 rows=1 width=76) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name on comm_flds cf (cost=0.29..3.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((comm_id = evc.comm_id) AND ((name)::text = 'initiator'::text))
50. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_values1 on comm_values cv (cost=0.29..3.31 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (comm_fld_id = cf.comm_fld_id)
  • Filter: ("position" = 0)
51. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..6.51 rows=1 width=76) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name on comm_flds cf_1 (cost=0.29..3.20 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((comm_id = evc.comm_id) AND ((name)::text = 'firstname'::text))
53. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_values1 on comm_values cv_1 (cost=0.29..3.31 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (comm_fld_id = cf_1.comm_fld_id)
  • Filter: ("position" = 0)
54. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..6.51 rows=1 width=76) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name on comm_flds cf_2 (cost=0.29..3.20 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((comm_id = evc.comm_id) AND ((name)::text = 'lastname'::text))
56. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_values1 on comm_values cv_2 (cost=0.29..3.31 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (comm_fld_id = cf_2.comm_fld_id)
  • Filter: ("position" = 0)
57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..6.61 rows=1 width=76) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_fld_name on comm_flds cf_3 (cost=0.29..3.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((comm_id = evc.comm_id) AND ((name)::text = 'subject'::text))
59. 0.000 0.000 ↓ 0.0

Index Scan using idx_comm_values1 on comm_values cv_3 (cost=0.29..3.31 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (comm_fld_id = cf_3.comm_fld_id)
  • Filter: ("position" = 0)