explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wYzy

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

Limit (cost=137,875.27..137,875.32 rows=20 width=1,310) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=137,875.27..137,877.01 rows=696 width=1,310) (actual rows= loops=)

  • Sort Key: ab.createdatetime DESC
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=27,028.20..137,856.75 rows=696 width=1,310) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=27,027.93..137,504.96 rows=696 width=1,001) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=468.39..46,826.48 rows=276 width=326) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=468.11..46,715.30 rows=276 width=246) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=450.93..41,965.22 rows=276 width=253) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Merge Join (cost=450.38..41,726.42 rows=276 width=240) (actual rows= loops=)

  • Merge Cond: (oc.outboundcampaignid = ab.outboundcampaignid)
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=450.11..41,675.78 rows=321 width=160) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=322.64..747.83 rows=321 width=176) (actual rows= loops=)

  • Join Filter: (oc.flowid = q.flowid)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.82..354.92 rows=321 width=118) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using idx_outboundcampaign_1 on outboundcampaign oc (cost=0.27..77.19 rows=321 width=118) (actual rows= loops=)

  • Filter: (((bottype)::text = 'amplify'::text) AND (organizationid = '1f9292ae-5446-4b89-8e09-bf7c37f0d4c7'::uuid))
13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.55..0.86 rows=1 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..0.83 rows=1 width=32) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using idx_agent_1 on agent a (cost=0.27..0.40 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (oc.agentid = agentid)
16. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_account_1 on account acc (cost=0.27..0.41 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (accountid = a.accountid)
17. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=24) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Materialize (cost=321.82..364.03 rows=6 width=74) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Subquery Scan on q (cost=321.82..364.00 rows=6 width=74) (actual rows= loops=)

  • Filter: (q._rownum = 1)
20. 0.000 0.000 ↓ 0.0

WindowAgg (cost=321.82..348.93 rows=1,205 width=2,932) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Sort (cost=321.82..324.83 rows=1,205 width=86) (actual rows= loops=)

  • Sort Key: f.flowid, fs.ordinal, fs.createdatetime
22. 0.000 0.000 ↓ 0.0

Hash Join (cost=155.81..260.16 rows=1,205 width=86) (actual rows= loops=)

  • Hash Cond: (ffp.flowid = f.flowid)
23. 0.000 0.000 ↓ 0.0

Hash Join (cost=105.16..192.94 rows=1,205 width=86) (actual rows= loops=)

  • Hash Cond: (fs.flowpageid = ffp.flowpageid)
24. 0.000 0.000 ↓ 0.0

Seq Scan on flowslot fs (cost=0.00..69.96 rows=1,296 width=86) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=90.91..90.91 rows=1,140 width=48) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash Join (cost=43.65..90.91 rows=1,140 width=48) (actual rows= loops=)

  • Hash Cond: (fp.flowpageid = ffp.flowpageid)
27. 0.000 0.000 ↓ 0.0

Seq Scan on flowpage fp (cost=0.00..31.26 rows=1,226 width=16) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=29.40..29.40 rows=1,140 width=32) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on flowfirstpage ffp (cost=0.00..29.40 rows=1,140 width=32) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=36.40..36.40 rows=1,140 width=16) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on flow f (cost=0.00..36.40 rows=1,140 width=16) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Aggregate (cost=127.47..127.48 rows=1 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=72.91..127.47 rows=1 width=32) (actual rows= loops=)

  • Hash Cond: (_ar.applicantid = _a.applicantid)
  • Filter: ((_ar.flowslotid = q.flowslotid) OR (_ar.flowslotid IS NULL))
34. 0.000 0.000 ↓ 0.0

Seq Scan on applicantresponse _ar (cost=0.00..48.66 rows=1,566 width=48) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=72.65..72.65 rows=21 width=16) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on applicant _a (cost=4.45..72.65 rows=21 width=16) (actual rows= loops=)

  • Recheck Cond: (flowid = oc.flowid)
37. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_applicant_flow_cdt (cost=0.00..4.44 rows=21 width=0) (actual rows= loops=)

  • Index Cond: (flowid = oc.flowid)
38. 0.000 0.000 ↓ 0.0

Index Scan using idx_amplifybot_2 on amplifybot ab (cost=0.27..46.10 rows=389 width=80) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.55..0.86 rows=1 width=29) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..0.83 rows=1 width=45) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Index Scan using idx_agent_1 on agent a_1 (cost=0.27..0.40 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (oc.agentid = agentid)
42. 0.000 0.000 ↓ 0.0

Index Scan using idx_account_1 on account acc_1 (cost=0.27..0.41 rows=1 width=29) (actual rows= loops=)

  • Index Cond: (accountid = a_1.accountid)
43. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=24) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Limit (cost=17.19..17.19 rows=1 width=17) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Sort (cost=17.19..17.19 rows=1 width=17) (actual rows= loops=)

  • Sort Key: _atd.createdatetime DESC
46. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on asynctask _atd (cost=13.15..17.18 rows=1 width=17) (actual rows= loops=)

  • Recheck Cond: ((organizationid = oc.organizationid) AND ((handlername)::text = 'amplifyBotCampaignCreateAudienceAndStartAsyncTaskHandler'::text) AND ((metadata -> 'refType'::text) ? 'OutboundCampaign'::text (...)
  • Filter: ((metadata -> 'refKey'::text) ? (oc.outboundcampaignid)::text)
47. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=13.15..13.15 rows=1 width=0) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_asynctask_org_handler (cost=0.00..4.87 rows=59 width=0) (actual rows= loops=)

  • Index Cond: ((organizationid = oc.organizationid) AND ((handlername)::text = 'amplifyBotCampaignCreateAudienceAndStartAsyncTaskHandler'::text))
49. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_asynctask_wrapper2 (cost=0.00..8.02 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((metadata -> 'refType'::text) ? 'OutboundCampaign'::text)
50. 0.000 0.000 ↓ 0.0

Index Scan using pk_amplifybot on amplifybot amplifybot7_ (cost=0.27..0.39 rows=1 width=80) (actual rows= loops=)

  • Index Cond: (ab.amplifybotid = amplifybotid)
51. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=26,559.54..26,791.83 rows=3 width=675) (actual rows= loops=)

  • Hash Cond: (oc_2.outboundcampaignid = oc_1.outboundcampaignid)
52. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=3,713.16..3,939.20 rows=452 width=64) (actual rows= loops=)

  • Group Key: oc_2.outboundcampaignid
53. 0.000 0.000 ↓ 0.0

Sort (cost=3,713.16..3,730.20 rows=6,816 width=41) (actual rows= loops=)

  • Sort Key: oc_2.outboundcampaignid
54. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=574.66..3,279.16 rows=6,816 width=41) (actual rows= loops=)

  • Hash Cond: (aca.outboundcampaignid = oc_2.outboundcampaignid)
55. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=551.49..3,162.27 rows=6,816 width=41) (actual rows= loops=)

  • Hash Cond: ((md.messageid = am.messageid) AND (md.torefkey = aca.outboundcampaignapplicantid))
56. 0.000 0.000 ↓ 0.0

Seq Scan on messagedelivery md (cost=0.00..2,465.53 rows=19,366 width=41) (actual rows= loops=)

  • Filter: ((channeltype)::text = 'sms'::text)
57. 0.000 0.000 ↓ 0.0

Hash (cost=449.25..449.25 rows=6,816 width=64) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=271.36..449.25 rows=6,816 width=64) (actual rows= loops=)

  • Hash Cond: (am.applicantid = aca.applicantid)
59. 0.000 0.000 ↓ 0.0

Seq Scan on applicantmessage am (cost=0.00..140.34 rows=2,731 width=32) (actual rows= loops=)

  • Filter: ((direction)::text = 'out'::text)
60. 0.000 0.000 ↓ 0.0

Hash (cost=186.16..186.16 rows=6,816 width=48) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Seq Scan on outboundcampaignapplicant aca (cost=0.00..186.16 rows=6,816 width=48) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash (cost=17.52..17.52 rows=452 width=16) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Seq Scan on outboundcampaign oc_2 (cost=0.00..17.52 rows=452 width=16) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Hash (cost=22,846.35..22,846.35 rows=3 width=611) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=22,564.16..22,846.35 rows=3 width=611) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=22,436.69..22,463.80 rows=3 width=587) (actual rows= loops=)

  • Hash Cond: (f_1.flowid = oc_1.flowid)
67. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,811.95..1,823.35 rows=1,140 width=64) (actual rows= loops=)

  • Group Key: f_1.flowid
68. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=562.36..1,416.14 rows=14,393 width=56) (actual rows= loops=)

  • Hash Cond: (a_3.applicantid = ac.applicantid)
69. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=50.65..715.48 rows=14,393 width=40) (actual rows= loops=)

  • Hash Cond: (a_3.flowid = f_1.flowid)
70. 0.000 0.000 ↓ 0.0

Seq Scan on applicant a_3 (cost=0.00..466.93 rows=14,393 width=40) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Hash (cost=36.40..36.40 rows=1,140 width=16) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Seq Scan on flow f_1 (cost=0.00..36.40 rows=1,140 width=16) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Hash (cost=342.98..342.98 rows=13,498 width=32) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Seq Scan on applicantcandidate ac (cost=0.00..342.98 rows=13,498 width=32) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Hash (cost=20,624.73..20,624.73 rows=1 width=539) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=20,582.52..20,624.73 rows=1 width=539) (actual rows= loops=)

  • Hash Cond: (q_1.flowid = oc_1.flowid)
77. 0.000 0.000 ↓ 0.0

Subquery Scan on q_1 (cost=20,581.21..20,623.38 rows=6 width=319) (actual rows= loops=)

  • Filter: (q_1._rownum = 1)
78. 0.000 0.000 ↓ 0.0

WindowAgg (cost=20,581.21..20,608.32 rows=1,205 width=3,113) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Sort (cost=20,581.21..20,584.22 rows=1,205 width=331) (actual rows= loops=)

  • Sort Key: f_2.flowid, fs_1.ordinal, fs_1.createdatetime
80. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=172.59..20,519.54 rows=1,205 width=331) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Hash Join (cost=155.81..260.16 rows=1,205 width=299) (actual rows= loops=)

  • Hash Cond: (ffp_1.flowid = f_2.flowid)
82. 0.000 0.000 ↓ 0.0

Hash Join (cost=105.16..192.94 rows=1,205 width=299) (actual rows= loops=)

  • Hash Cond: (fs_1.flowpageid = ffp_1.flowpageid)
83. 0.000 0.000 ↓ 0.0

Seq Scan on flowslot fs_1 (cost=0.00..69.96 rows=1,296 width=299) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Hash (cost=90.91..90.91 rows=1,140 width=48) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Hash Join (cost=43.65..90.91 rows=1,140 width=48) (actual rows= loops=)

  • Hash Cond: (fp_1.flowpageid = ffp_1.flowpageid)
86. 0.000 0.000 ↓ 0.0

Seq Scan on flowpage fp_1 (cost=0.00..31.26 rows=1,226 width=16) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Hash (cost=29.40..29.40 rows=1,140 width=32) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on flowfirstpage ffp_1 (cost=0.00..29.40 rows=1,140 width=32) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Hash (cost=36.40..36.40 rows=1,140 width=16) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Seq Scan on flow f_2 (cost=0.00..36.40 rows=1,140 width=16) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Aggregate (cost=16.78..16.79 rows=1 width=32) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.68..16.78 rows=1 width=16) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..16.59 rows=1 width=32) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Index Scan using idx_flowslotbranch_2 on flowslotbranch fsb (cost=0.27..8.29 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (flowslotid = fs_1.flowslotid)
95. 0.000 0.000 ↓ 0.0

Index Scan using idx_flowslotbranchaction_2 on flowslotbranchaction fsba (cost=0.28..8.29 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (flowslotbranchid = fsb.flowslotbranchid)
96. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_flowaction_1 on flowaction fa (cost=0.14..0.18 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (flowactionid = fsba.flowactionid)
97. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=1 width=204) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.82..1.30 rows=1 width=204) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Index Scan using idx_outboundcampaign_1 on outboundcampaign oc_1 (cost=0.27..0.46 rows=1 width=191) (actual rows= loops=)

  • Index Cond: (ab.outboundcampaignid = outboundcampaignid)
100. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.55..0.82 rows=1 width=29) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..0.79 rows=1 width=45) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Index Scan using idx_agent_1 on agent a_2 (cost=0.27..0.37 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (oc_1.agentid = agentid)
103. 0.000 0.000 ↓ 0.0

Index Scan using idx_account_1 on account acc_2 (cost=0.27..0.41 rows=1 width=29) (actual rows= loops=)

  • Index Cond: (accountid = a_2.accountid)
104. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=24) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Aggregate (cost=127.47..127.48 rows=1 width=16) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=72.91..127.47 rows=1 width=32) (actual rows= loops=)

  • Hash Cond: (_ar_1.applicantid = _a_1.applicantid)
  • Filter: ((_ar_1.flowslotid = q_1.flowslotid) OR (_ar_1.flowslotid IS NULL))
107. 0.000 0.000 ↓ 0.0

Seq Scan on applicantresponse _ar_1 (cost=0.00..48.66 rows=1,566 width=48) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Hash (cost=72.65..72.65 rows=21 width=16) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on applicant _a_1 (cost=4.45..72.65 rows=21 width=16) (actual rows= loops=)

  • Recheck Cond: (flowid = oc_1.flowid)
110. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_applicant_flow_cdt (cost=0.00..4.44 rows=21 width=0) (actual rows= loops=)

  • Index Cond: (flowid = oc_1.flowid)
111. 0.000 0.000 ↓ 0.0

Index Scan using idx_outboundcampaign_1 on outboundcampaign outboundca2_ (cost=0.27..0.44 rows=1 width=191) (actual rows= loops=)

  • Index Cond: (oc_1.outboundcampaignid = outboundcampaignid)