explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x5F8 : slow

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

Nested Loop (cost=69,687.44..69,688.10 rows=1 width=52) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Merge Join (cost=69,687.31..69,687.93 rows=1 width=65) (actual rows= loops=)

  • Merge Cond: ((f_opportunitysnapshot.stage_id = f_stagehistory_6.stage_id) AND (f_opportunitysnapshot.opportunityid_id = f_stagehistory_6.opportunityid_id))
3. 0.000 0.000 ↓ 0.0

Sort (cost=57,881.07..57,881.08 rows=1 width=52) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=57,390.41..57,881.06 rows=1 width=52) (actual rows= loops=)

  • Merge Cond: ((f_opportunitysnapshot.ownerid_id = f_opportunitysnapshot_8.ownerid_id) AND (f_opportunitysnapshot.stage_id = f_opportunitysnapshot_8.stage_id) AND (f_opportunitysnapshot.opportunityid_id = f_opportunitysnapshot_8.opportunityid_id))
5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=38,811.98..38,882.18 rows=2,808 width=45) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot.ownerid_id, f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
6. 0.000 0.000 ↓ 0.0

Sort (cost=38,811.98..38,819.00 rows=2,808 width=18) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot.ownerid_id, f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=30,904.65..38,651.15 rows=2,808 width=18) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot.dt_snapshotdate = sub.c_87ca066c78de7e50)
8. 0.000 0.000 ↓ 0.0

Seq Scan on f_opportunitysnapshot (cost=0.00..6,612.94 rows=294,794 width=22) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=30,904.64..30,904.64 rows=1 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Subquery Scan on sub (cost=30,355.80..30,904.64 rows=1 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=30,355.80..30,904.63 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30,355.80..30,904.61 rows=1 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_1.dt_snapshotdate <= (max(f_timeline_3.dt_timeline)))
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30,355.80..30,747.51 rows=1 width=4) (actual rows= loops=)

  • Join Filter: ((f_stage_1.id = f_opportunitysnapshot_1.stage_id) AND (f_opportunitysnapshot_4.ownerid_id = f_opportunitysnapshot_1.ownerid_id) AND (f_opportunitysnapshot_4.opportunityid_id = f_opportunitysnapshot_1.opportunityid_id))
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30,355.38..30,743.02 rows=1 width=28) (actual rows= loops=)

  • Join Filter: ((f_stage_1.id = f_opportunitysnapshot_4.stage_id) AND (((avg(f_stagehistory.f_duration)) * 1.5) < sub_3_1.c_1df2a5e91e0c4512))
15. 0.000 0.000 ↓ 0.0

Merge Join (cost=11,374.21..11,375.50 rows=6 width=40) (actual rows= loops=)

  • Merge Cond: (f_stage_1.id = f_stagehistory.stage_id)
16. 0.000 0.000 ↓ 0.0

Sort (cost=1.18..1.19 rows=6 width=4) (actual rows= loops=)

  • Sort Key: f_stage_1.id
17. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_1 (cost=0.00..1.10 rows=6 width=4) (actual rows= loops=)

  • Filter: (status_id = 7)
18. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,373.03..11,374.13 rows=8 width=37) (actual rows= loops=)

  • Group Key: f_stagehistory.stage_id
19. 0.000 0.000 ↓ 0.0

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual rows= loops=)

  • Sort Key: f_stagehistory.stage_id
20. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual rows= loops=)

  • Hash Cond: (f_stagehistory.opportunityid_id = sub_1.a_990)
21. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_1 (cost=11,214.09..11,222.28 rows=117 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_2.opportunityid_id
  • Filter: (1 <= max(1))
25. 0.000 0.000 ↓ 0.0

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_2.opportunityid_id
26. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_2.dt_snapshotdate = sub_2.c_ea3805e655b4b6c5)
27. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_2 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
29. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_2 (cost=694.00..4,819.61 rows=36,849 width=12) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_2.id)
30. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_2.id)
31. 0.000 0.000 ↓ 0.0

Hash (cost=5,868.34..5,868.34 rows=1 width=4) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_2 (cost=694.00..5,868.34 rows=1 width=4) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=694.00..5,868.33 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_3.dt_snapshotdate <= (max(f_timeline.dt_timeline)))
35. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
36. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_3 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
39. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_3 (cost=694.00..4,819.61 rows=36,849 width=8) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_3.id)
40. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_3.id)
41. 0.000 0.000 ↓ 0.0

Materialize (cost=18,981.17..19,351.07 rows=140 width=52) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash Join (cost=18,981.17..19,350.37 rows=140 width=52) (actual rows= loops=)

  • Hash Cond: ((f_opportunitysnapshot_4.stage_id = sub_3_1.a_1095) AND (f_opportunitysnapshot_4.opportunityid_id = sub_3_1.a_990))
43. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=18,578.43..18,933.35 rows=936 width=17) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
  • Filter: (0 < max(1))
44. 0.000 0.000 ↓ 0.0

Gather Merge (cost=18,578.43..18,874.85 rows=2,340 width=16) (actual rows= loops=)

  • Workers Planned: 2
45. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=17,578.41..17,604.74 rows=1,170 width=16) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
46. 0.000 0.000 ↓ 0.0

Sort (cost=17,578.41..17,581.34 rows=1,170 width=12) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
47. 0.000 0.000 ↓ 0.0

Hash Join (cost=12,153.16..17,518.79 rows=1,170 width=12) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_4.dt_snapshotdate = sub_4.c_95b863fc9fe5b8d2)
48. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on f_opportunitysnapshot f_opportunitysnapshot_4 (cost=0.00..4,893.31 rows=122,831 width=16) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash (cost=12,153.15..12,153.15 rows=1 width=4) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_4 (cost=11,552.83..12,153.15 rows=1 width=4) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,552.83..12,153.14 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
52. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.83..12,152.46 rows=134 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_5.dt_snapshotdate <= (max(f_timeline_1.dt_timeline)))
53. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
54. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_1 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.83..11,990.35 rows=402 width=4) (actual rows= loops=)

  • Join Filter: (f_stage_4.id = f_opportunitysnapshot_5.stage_id)
56. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.41..11,722.71 rows=60 width=16) (actual rows= loops=)

  • Join Filter: (sub_1_1.a_1095 = f_stage_4.id)
57. 0.000 0.000 ↓ 0.0

Index Scan using f_stage_aa5bpx10l2aefhw_pkey on f_stage f_stage_4 (cost=0.13..12.27 rows=6 width=4) (actual rows= loops=)

  • Filter: (status_id = 7)
58. 0.000 0.000 ↓ 0.0

Materialize (cost=11,552.28..11,703.44 rows=80 width=12) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,552.28..11,703.04 rows=80 width=12) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_1.stage_id = sub_1_1.a_1095)
  • Join Filter: ((sub_1_1.c_af0995c53c29dea2 * 1.5) < (avg(f_stagehistory_1.f_duration)))
60. 0.000 0.000 ↓ 0.0

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual rows= loops=)

  • Group Key: f_stagehistory_1.stage_id, f_stagehistory_1.opportunityid_id
61. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_1 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash (cost=11,374.21..11,374.21 rows=8 width=36) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_1_1 (cost=11,373.03..11,374.21 rows=8 width=36) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,373.03..11,374.13 rows=8 width=37) (actual rows= loops=)

  • Group Key: f_stagehistory_2.stage_id
65. 0.000 0.000 ↓ 0.0

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual rows= loops=)

  • Sort Key: f_stagehistory_2.stage_id
66. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_2.opportunityid_id = sub_5.a_990)
67. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_2 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_5 (cost=11,214.09..11,222.28 rows=117 width=4) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_6.opportunityid_id
  • Filter: (1 <= max(1))
71. 0.000 0.000 ↓ 0.0

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_6.opportunityid_id
72. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_6.dt_snapshotdate = sub_6.c_ea3805e655b4b6c5)
73. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_5 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
75. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_6 (cost=694.00..4,819.61 rows=36,849 width=12) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_5.id)
76. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_5.id)
77. 0.000 0.000 ↓ 0.0

Hash (cost=5,868.34..5,868.34 rows=1 width=4) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_6 (cost=694.00..5,868.34 rows=1 width=4) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=694.00..5,868.33 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
80. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_7.dt_snapshotdate <= (max(f_timeline_2.dt_timeline)))
81. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
82. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_2 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_6 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
85. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_7 (cost=694.00..4,819.61 rows=36,849 width=8) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_6.id)
86. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_6.id)
87. 0.000 0.000 ↓ 0.0

Index Scan using f_opportunitysnapshot_aaj8qsgfemaj8ms_opportunityid_id_idx on f_opportunitysnapshot f_opportunitysnapshot_5 (cost=0.42..4.37 rows=7 width=12) (actual rows= loops=)

  • Index Cond: (opportunityid_id = f_stagehistory_1.opportunityid_id)
  • Filter: (f_stagehistory_1.stage_id = stage_id)
88. 0.000 0.000 ↓ 0.0

Hash (cost=312.83..312.83 rows=5,994 width=40) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_3_1 (cost=177.96..312.83 rows=5,994 width=40) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual rows= loops=)

  • Group Key: f_stagehistory_3.stage_id, f_stagehistory_3.opportunityid_id
91. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_3 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Index Scan using f_opportunitysnapshot_aaj8qsgfemaj8ms_opportunityid_id_idx on f_opportunitysnapshot f_opportunitysnapshot_1 (cost=0.42..4.37 rows=7 width=16) (actual rows= loops=)

  • Index Cond: (opportunityid_id = sub_3_1.a_990)
  • Filter: (sub_3_1.a_1095 = stage_id)
93. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
94. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_3 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=18,578.43..18,933.35 rows=936 width=17) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
  • Filter: (0 < max(1))
96. 0.000 0.000 ↓ 0.0

Gather Merge (cost=18,578.43..18,874.85 rows=2,340 width=16) (actual rows= loops=)

  • Workers Planned: 2
97. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=17,578.41..17,604.74 rows=1,170 width=16) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
98. 0.000 0.000 ↓ 0.0

Sort (cost=17,578.41..17,581.34 rows=1,170 width=12) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
99. 0.000 0.000 ↓ 0.0

Hash Join (cost=12,153.16..17,518.79 rows=1,170 width=12) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_8.dt_snapshotdate = sub_7.c_95b863fc9fe5b8d2)
100. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on f_opportunitysnapshot f_opportunitysnapshot_8 (cost=0.00..4,893.31 rows=122,831 width=16) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash (cost=12,153.15..12,153.15 rows=1 width=4) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_7 (cost=11,552.83..12,153.15 rows=1 width=4) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,552.83..12,153.14 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
104. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.83..12,152.46 rows=134 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_9.dt_snapshotdate <= (max(f_timeline_4.dt_timeline)))
105. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
106. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_4 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.83..11,990.35 rows=402 width=4) (actual rows= loops=)

  • Join Filter: (f_stage_7.id = f_opportunitysnapshot_9.stage_id)
108. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,552.41..11,722.71 rows=60 width=16) (actual rows= loops=)

  • Join Filter: (sub_1_2.a_1095 = f_stage_7.id)
109. 0.000 0.000 ↓ 0.0

Index Scan using f_stage_aa5bpx10l2aefhw_pkey on f_stage f_stage_7 (cost=0.13..12.27 rows=6 width=4) (actual rows= loops=)

  • Filter: (status_id = 7)
110. 0.000 0.000 ↓ 0.0

Materialize (cost=11,552.28..11,703.44 rows=80 width=12) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,552.28..11,703.04 rows=80 width=12) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_4.stage_id = sub_1_2.a_1095)
  • Join Filter: ((sub_1_2.c_af0995c53c29dea2 * 1.5) < (avg(f_stagehistory_4.f_duration)))
112. 0.000 0.000 ↓ 0.0

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual rows= loops=)

  • Group Key: f_stagehistory_4.stage_id, f_stagehistory_4.opportunityid_id
113. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_4 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Hash (cost=11,374.21..11,374.21 rows=8 width=36) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_1_2 (cost=11,373.03..11,374.21 rows=8 width=36) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,373.03..11,374.13 rows=8 width=37) (actual rows= loops=)

  • Group Key: f_stagehistory_5.stage_id
117. 0.000 0.000 ↓ 0.0

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual rows= loops=)

  • Sort Key: f_stagehistory_5.stage_id
118. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_5.opportunityid_id = sub_8.a_990)
119. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_5 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_8 (cost=11,214.09..11,222.28 rows=117 width=4) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_10.opportunityid_id
  • Filter: (1 <= max(1))
123. 0.000 0.000 ↓ 0.0

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_10.opportunityid_id
124. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_10.dt_snapshotdate = sub_9.c_ea3805e655b4b6c5)
125. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_8 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
127. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_10 (cost=694.00..4,819.61 rows=36,849 width=12) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_8.id)
128. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_8.id)
129. 0.000 0.000 ↓ 0.0

Hash (cost=5,868.34..5,868.34 rows=1 width=4) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_9 (cost=694.00..5,868.34 rows=1 width=4) (actual rows= loops=)

131. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=694.00..5,868.33 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
132. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_11.dt_snapshotdate <= (max(f_timeline_5.dt_timeline)))
133. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
134. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_5 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

135. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_9 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
137. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_11 (cost=694.00..4,819.61 rows=36,849 width=8) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_9.id)
138. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_9.id)
139. 0.000 0.000 ↓ 0.0

Index Scan using f_opportunitysnapshot_aaj8qsgfemaj8ms_opportunityid_id_idx on f_opportunitysnapshot f_opportunitysnapshot_9 (cost=0.42..4.37 rows=7 width=12) (actual rows= loops=)

  • Index Cond: (opportunityid_id = f_stagehistory_4.opportunityid_id)
  • Filter: (f_stagehistory_4.stage_id = stage_id)
140. 0.000 0.000 ↓ 0.0

Sort (cost=11,806.24..11,806.44 rows=80 width=21) (actual rows= loops=)

  • Sort Key: f_stagehistory_6.stage_id, f_stagehistory_6.opportunityid_id
141. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,637.96..11,803.71 rows=80 width=21) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_6.stage_id = sub_3.a_1095)
  • Join Filter: ((sub_3.c_af0995c53c29dea2 * 1.5) < (avg(f_stagehistory_6.f_duration)))
142. 0.000 0.000 ↓ 0.0

HashAggregate (cost=263.65..353.56 rows=5,994 width=50) (actual rows= loops=)

  • Group Key: f_stagehistory_6.stage_id, f_stagehistory_6.opportunityid_id
143. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_6 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

144. 0.000 0.000 ↓ 0.0

Hash (cost=11,374.21..11,374.21 rows=8 width=36) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_3 (cost=11,373.03..11,374.21 rows=8 width=36) (actual rows= loops=)

146. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,373.03..11,374.13 rows=8 width=37) (actual rows= loops=)

  • Group Key: f_stagehistory_7.stage_id
147. 0.000 0.000 ↓ 0.0

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual rows= loops=)

  • Sort Key: f_stagehistory_7.stage_id
148. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual rows= loops=)

  • Hash Cond: (f_stagehistory_7.opportunityid_id = sub_10.a_990)
149. 0.000 0.000 ↓ 0.0

Seq Scan on f_stagehistory f_stagehistory_7 (cost=0.00..126.55 rows=6,855 width=13) (actual rows= loops=)

150. 0.000 0.000 ↓ 0.0

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_10 (cost=11,214.09..11,222.28 rows=117 width=4) (actual rows= loops=)

152. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual rows= loops=)

  • Group Key: f_opportunitysnapshot_12.opportunityid_id
  • Filter: (1 <= max(1))
153. 0.000 0.000 ↓ 0.0

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual rows= loops=)

  • Sort Key: f_opportunitysnapshot_12.opportunityid_id
154. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual rows= loops=)

  • Hash Cond: (f_opportunitysnapshot_12.dt_snapshotdate = sub_11.c_ea3805e655b4b6c5)
155. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual rows= loops=)

156. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_10 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
157. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_12 (cost=694.00..4,819.61 rows=36,849 width=12) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_10.id)
158. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_10.id)
159. 0.000 0.000 ↓ 0.0

Hash (cost=5,868.34..5,868.34 rows=1 width=4) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Subquery Scan on sub_11 (cost=694.00..5,868.34 rows=1 width=4) (actual rows= loops=)

161. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=694.00..5,868.33 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
162. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual rows= loops=)

  • Join Filter: (f_opportunitysnapshot_13.dt_snapshotdate <= (max(f_timeline_6.dt_timeline)))
163. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual rows= loops=)

  • Group Key: NULL::integer
164. 0.000 0.000 ↓ 0.0

Seq Scan on f_timeline f_timeline_6 (cost=0.00..118.71 rows=7,671 width=8) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual rows= loops=)

166. 0.000 0.000 ↓ 0.0

Seq Scan on f_stage f_stage_11 (cost=0.00..1.10 rows=1 width=4) (actual rows= loops=)

  • Filter: (status_id = 11)
167. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_13 (cost=694.00..4,819.61 rows=36,849 width=8) (actual rows= loops=)

  • Recheck Cond: (stage_id = f_stage_11.id)
168. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on f_opportunitysnapshot_aaj8qsgfemaj8ms_stage_id_idx (cost=0.00..684.79 rows=36,849 width=0) (actual rows= loops=)

  • Index Cond: (stage_id = f_stage_11.id)
169. 0.000 0.000 ↓ 0.0

Index Scan using f_stage_aa5bpx10l2aefhw_pkey on f_stage (cost=0.13..0.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = f_opportunitysnapshot.stage_id)
  • Filter: (status_id = 7)