explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Virv : slooow

Settings
# exclusive inclusive rows x rows loops node
1. 0.178 50,767.309 ↓ 650.0 650 1

Nested Loop (cost=69,687.44..69,688.10 rows=1 width=52) (actual time=50,765.951..50,767.309 rows=650 loops=1)

2. 0.429 50,766.481 ↓ 650.0 650 1

Merge Join (cost=69,687.31..69,687.93 rows=1 width=65) (actual time=50,765.935..50,766.481 rows=650 loops=1)

  • Merge Cond: ((f_opportunitysnapshot.stage_id = f_stagehistory_6.stage_id) AND (f_opportunitysnapshot.opportunityid_id = f_stagehistory_6.opportunityid_id))
3. 3.498 50,540.746 ↓ 912.0 912 1

Sort (cost=57,881.07..57,881.08 rows=1 width=52) (actual time=50,540.687..50,540.746 rows=912 loops=1)

  • Sort Key: f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
  • Sort Method: quicksort Memory: 661kB
4. 3.608 50,537.248 ↓ 5,999.0 5,999 1

Merge Join (cost=57,390.41..57,881.06 rows=1 width=52) (actual time=50,521.134..50,537.248 rows=5,999 loops=1)

  • 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. 5.417 50,246.623 ↓ 2.1 5,999 1

GroupAggregate (cost=38,811.98..38,882.18 rows=2,808 width=45) (actual time=50,240.576..50,246.623 rows=5,999 loops=1)

  • Group Key: f_opportunitysnapshot.ownerid_id, f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
6. 4.055 50,241.206 ↓ 2.1 6,003 1

Sort (cost=38,811.98..38,819.00 rows=2,808 width=18) (actual time=50,240.565..50,241.206 rows=6,003 loops=1)

  • Sort Key: f_opportunitysnapshot.ownerid_id, f_opportunitysnapshot.stage_id, f_opportunitysnapshot.opportunityid_id
  • Sort Method: quicksort Memory: 654kB
7. 36.311 50,237.151 ↓ 2.1 6,003 1

Hash Join (cost=30,904.65..38,651.15 rows=2,808 width=18) (actual time=50,179.000..50,237.151 rows=6,003 loops=1)

  • Hash Cond: (f_opportunitysnapshot.dt_snapshotdate = sub.c_87ca066c78de7e50)
8. 21.884 21.884 ↑ 1.0 294,794 1

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

9. 0.004 50,178.956 ↑ 1.0 1 1

Hash (cost=30,904.64..30,904.64 rows=1 width=4) (actual time=50,178.955..50,178.956 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.001 50,178.952 ↑ 1.0 1 1

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

11. 7.529 50,178.951 ↑ 1.0 1 1

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

  • Group Key: NULL::integer
12. 47.673 50,171.422 ↓ 21,869.0 21,869 1

Nested Loop (cost=30,355.80..30,904.61 rows=1 width=8) (actual time=448.826..50,171.422 rows=21,869 loops=1)

  • Join Filter: (f_opportunitysnapshot_1.dt_snapshotdate <= (max(f_timeline_3.dt_timeline)))
13. 9.560 502.988 ↓ 21,869.0 21,869 1

Nested Loop (cost=30,355.80..30,747.51 rows=1 width=4) (actual time=446.523..502.988 rows=21,869 loops=1)

  • 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. 5.385 465.478 ↓ 650.0 650 1

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

  • Join Filter: ((f_stage_1.id = f_opportunitysnapshot_4.stage_id) AND (((avg(f_stagehistory.f_duration)) * 1.5) < sub_3_1.c_1df2a5e91e0c4512))
  • Rows Removed by Join Filter: 35134
15. 0.015 185.155 ↑ 1.0 6 1

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

  • Merge Cond: (f_stage_1.id = f_stagehistory.stage_id)
16. 0.014 0.023 ↑ 1.0 6 1

Sort (cost=1.18..1.19 rows=6 width=4) (actual time=0.019..0.023 rows=6 loops=1)

  • Sort Key: f_stage_1.id
  • Sort Method: quicksort Memory: 25kB
17. 0.009 0.009 ↑ 1.0 6 1

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

  • Filter: (status_id = 7)
  • Rows Removed by Filter: 2
18. 0.110 185.117 ↑ 1.3 6 1

GroupAggregate (cost=11,373.03..11,374.13 rows=8 width=37) (actual time=184.985..185.117 rows=6 loops=1)

  • Group Key: f_stagehistory.stage_id
19. 0.627 185.007 ↓ 2.7 362 1

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual time=184.962..185.007 rows=362 loops=1)

  • Sort Key: f_stagehistory.stage_id
  • Sort Method: quicksort Memory: 269kB
20. 1.663 184.380 ↓ 27.5 3,683 1

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual time=182.178..184.380 rows=3,683 loops=1)

  • Hash Cond: (f_stagehistory.opportunityid_id = sub_1.a_990)
21. 0.559 0.559 ↑ 1.0 6,855 1

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

22. 0.613 182.158 ↓ 28.3 3,311 1

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual time=182.158..182.158 rows=3,311 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 149kB
23. 0.387 181.545 ↓ 28.3 3,311 1

Subquery Scan on sub_1 (cost=11,214.09..11,222.28 rows=117 width=4) (actual time=179.611..181.545 rows=3,311 loops=1)

24. 1.340 181.158 ↓ 28.3 3,311 1

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual time=179.610..181.158 rows=3,311 loops=1)

  • Group Key: f_opportunitysnapshot_2.opportunityid_id
  • Filter: (1 <= max(1))
25. 1.046 179.818 ↓ 9.4 3,314 1

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual time=179.603..179.818 rows=3,314 loops=1)

  • Sort Key: f_opportunitysnapshot_2.opportunityid_id
  • Sort Method: quicksort Memory: 252kB
26. 14.147 178.772 ↓ 9.4 3,314 1

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual time=118.948..178.772 rows=3,314 loops=1)

  • Hash Cond: (f_opportunitysnapshot_2.dt_snapshotdate = sub_2.c_ea3805e655b4b6c5)
27. 27.151 55.449 ↓ 4.4 163,192 1

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual time=9.731..55.449 rows=163,192 loops=1)

28. 0.005 0.005 ↑ 1.0 1 1

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
29. 18.905 28.293 ↓ 4.4 163,192 1

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_2 (cost=694.00..4,819.61 rows=36,849 width=12) (actual time=9.723..28.293 rows=163,192 loops=1)

  • Recheck Cond: (stage_id = f_stage_2.id)
  • Heap Blocks: exact=2947
30. 9.388 9.388 ↓ 4.4 163,192 1

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

  • Index Cond: (stage_id = f_stage_2.id)
31. 0.003 109.176 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.002 109.173 ↑ 1.0 1 1

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

33. 25.094 109.171 ↑ 1.0 1 1

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

  • Group Key: NULL::integer
34. 33.433 84.077 ↓ 13.3 163,192 1

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual time=9.312..84.077 rows=163,192 loops=1)

  • Join Filter: (f_opportunitysnapshot_3.dt_snapshotdate <= (max(f_timeline.dt_timeline)))
35. 1.353 2.360 ↑ 1.0 1 1

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

  • Group Key: NULL::integer
36. 1.007 1.007 ↑ 1.0 7,671 1

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

37. 20.867 48.284 ↓ 4.4 163,192 1

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual time=6.948..48.284 rows=163,192 loops=1)

38. 0.010 0.010 ↑ 1.0 1 1

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
39. 20.844 27.407 ↓ 4.4 163,192 1

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_3 (cost=694.00..4,819.61 rows=36,849 width=8) (actual time=6.934..27.407 rows=163,192 loops=1)

  • Recheck Cond: (stage_id = f_stage_3.id)
  • Heap Blocks: exact=2947
40. 6.563 6.563 ↓ 4.4 163,192 1

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

  • Index Cond: (stage_id = f_stage_3.id)
41. 3.615 274.938 ↓ 42.6 5,964 6

Materialize (cost=18,981.17..19,351.07 rows=140 width=52) (actual time=43.583..45.823 rows=5,964 loops=6)

42. 3.453 271.323 ↓ 42.6 5,964 1

Hash Join (cost=18,981.17..19,350.37 rows=140 width=52) (actual time=261.492..271.323 rows=5,964 loops=1)

  • Hash Cond: ((f_opportunitysnapshot_4.stage_id = sub_3_1.a_1095) AND (f_opportunitysnapshot_4.opportunityid_id = sub_3_1.a_990))
43. 3.093 259.395 ↓ 6.4 5,999 1

Finalize GroupAggregate (cost=18,578.43..18,933.35 rows=936 width=17) (actual time=252.979..259.395 rows=5,999 loops=1)

  • Group Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
  • Filter: (0 < max(1))
44. 7.404 256.302 ↓ 2.6 6,001 1

Gather Merge (cost=18,578.43..18,874.85 rows=2,340 width=16) (actual time=252.973..256.302 rows=6,001 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
45. 0.909 248.898 ↓ 1.7 2,000 3 / 3

Partial GroupAggregate (cost=17,578.41..17,604.74 rows=1,170 width=16) (actual time=247.784..248.898 rows=2,000 loops=3)

  • Group Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
46. 1.225 247.989 ↓ 1.7 2,001 3 / 3

Sort (cost=17,578.41..17,581.34 rows=1,170 width=12) (actual time=247.777..247.989 rows=2,001 loops=3)

  • Sort Key: f_opportunitysnapshot_4.ownerid_id, f_opportunitysnapshot_4.stage_id, f_opportunitysnapshot_4.opportunityid_id
  • Sort Method: quicksort Memory: 194kB
  • Worker 0: Sort Method: quicksort Memory: 142kB
  • Worker 1: Sort Method: quicksort Memory: 140kB
47. 12.279 246.764 ↓ 1.7 2,001 3 / 3

Hash Join (cost=12,153.16..17,518.79 rows=1,170 width=12) (actual time=226.696..246.764 rows=2,001 loops=3)

  • Hash Cond: (f_opportunitysnapshot_4.dt_snapshotdate = sub_4.c_95b863fc9fe5b8d2)
48. 7.835 7.835 ↑ 1.2 98,265 3 / 3

Parallel Seq Scan on f_opportunitysnapshot f_opportunitysnapshot_4 (cost=0.00..4,893.31 rows=122,831 width=16) (actual time=0.012..7.835 rows=98,265 loops=3)

49. 0.007 226.650 ↑ 1.0 1 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.001 226.643 ↑ 1.0 1 3 / 3

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

51. 4.455 226.642 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
52. 5.858 222.187 ↓ 198.0 26,536 3 / 3

Nested Loop (cost=11,552.83..12,152.46 rows=134 width=8) (actual time=191.127..222.187 rows=26,536 loops=3)

  • Join Filter: (f_opportunitysnapshot_5.dt_snapshotdate <= (max(f_timeline_1.dt_timeline)))
53. 1.291 2.265 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
54. 0.974 0.974 ↑ 1.0 7,671 3 / 3

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

55. 5.283 214.064 ↓ 66.0 26,536 3 / 3

Nested Loop (cost=11,552.83..11,990.35 rows=402 width=4) (actual time=188.859..214.064 rows=26,536 loops=3)

  • Join Filter: (f_stage_4.id = f_opportunitysnapshot_5.stage_id)
56. 0.710 195.593 ↓ 15.7 942 3 / 3

Nested Loop (cost=11,552.41..11,722.71 rows=60 width=16) (actual time=188.830..195.593 rows=942 loops=3)

  • Join Filter: (sub_1_1.a_1095 = f_stage_4.id)
  • Rows Removed by Join Filter: 4710
57. 0.021 0.021 ↑ 1.0 6 3 / 3

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

  • Filter: (status_id = 7)
  • Rows Removed by Filter: 2
58. 0.483 194.862 ↓ 11.8 942 18 / 3

Materialize (cost=11,552.28..11,703.44 rows=80 width=12) (actual time=31.469..32.477 rows=942 loops=18)

59. 2.466 194.379 ↓ 11.8 942 3 / 3

Hash Join (cost=11,552.28..11,703.04 rows=80 width=12) (actual time=188.806..194.379 rows=942 loops=3)

  • 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)))
  • Rows Removed by Join Filter: 5913
60. 5.983 6.540 ↓ 1.1 6,855 3 / 3

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual time=3.419..6.540 rows=6,855 loops=3)

  • Group Key: f_stagehistory_1.stage_id, f_stagehistory_1.opportunityid_id
61. 0.557 0.557 ↑ 1.0 6,855 3 / 3

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

62. 0.005 185.373 ↑ 1.0 8 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
63. 0.003 185.368 ↑ 1.0 8 3 / 3

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

64. 0.650 185.365 ↑ 1.0 8 3 / 3

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

  • Group Key: f_stagehistory_2.stage_id
65. 0.792 184.715 ↓ 27.5 3,683 3 / 3

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual time=184.511..184.715 rows=3,683 loops=3)

  • Sort Key: f_stagehistory_2.stage_id
  • Sort Method: quicksort Memory: 269kB
  • Worker 0: Sort Method: quicksort Memory: 269kB
  • Worker 1: Sort Method: quicksort Memory: 269kB
66. 1.675 183.923 ↓ 27.5 3,683 3 / 3

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual time=181.700..183.923 rows=3,683 loops=3)

  • Hash Cond: (f_stagehistory_2.opportunityid_id = sub_5.a_990)
67. 0.557 0.557 ↑ 1.0 6,855 3 / 3

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

68. 0.631 181.691 ↓ 28.3 3,311 3 / 3

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual time=181.691..181.691 rows=3,311 loops=3)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 149kB
69. 0.420 181.060 ↓ 28.3 3,311 3 / 3

Subquery Scan on sub_5 (cost=11,214.09..11,222.28 rows=117 width=4) (actual time=178.982..181.060 rows=3,311 loops=3)

70. 1.438 180.640 ↓ 28.3 3,311 3 / 3

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual time=178.982..180.640 rows=3,311 loops=3)

  • Group Key: f_opportunitysnapshot_6.opportunityid_id
  • Filter: (1 <= max(1))
71. 1.087 179.202 ↓ 9.4 3,314 3 / 3

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual time=178.975..179.202 rows=3,314 loops=3)

  • Sort Key: f_opportunitysnapshot_6.opportunityid_id
  • Sort Method: quicksort Memory: 252kB
  • Worker 0: Sort Method: quicksort Memory: 252kB
  • Worker 1: Sort Method: quicksort Memory: 252kB
72. 15.044 178.115 ↓ 9.4 3,314 3 / 3

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual time=114.725..178.115 rows=3,314 loops=3)

  • Hash Cond: (f_opportunitysnapshot_6.dt_snapshotdate = sub_6.c_ea3805e655b4b6c5)
73. 28.974 54.935 ↓ 4.4 163,192 3 / 3

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual time=6.554..54.935 rows=163,192 loops=3)

74. 0.012 0.012 ↑ 1.0 1 3 / 3

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
75. 19.746 25.949 ↓ 4.4 163,192 3 / 3

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_6 (cost=694.00..4,819.61 rows=36,849 width=12) (actual time=6.539..25.949 rows=163,192 loops=3)

  • Recheck Cond: (stage_id = f_stage_5.id)
  • Heap Blocks: exact=2947
76. 6.203 6.203 ↓ 4.4 163,192 3 / 3

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

  • Index Cond: (stage_id = f_stage_5.id)
77. 0.003 108.136 ↑ 1.0 1 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
78. 0.002 108.133 ↑ 1.0 1 3 / 3

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

79. 25.336 108.131 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
80. 33.898 82.795 ↓ 13.3 163,192 3 / 3

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual time=8.183..82.795 rows=163,192 loops=3)

  • Join Filter: (f_opportunitysnapshot_7.dt_snapshotdate <= (max(f_timeline_2.dt_timeline)))
81. 1.248 2.146 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
82. 0.898 0.898 ↑ 1.0 7,671 3 / 3

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

83. 21.148 46.751 ↓ 4.4 163,192 3 / 3

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual time=6.034..46.751 rows=163,192 loops=3)

84. 0.006 0.006 ↑ 1.0 1 3 / 3

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
85. 19.886 25.597 ↓ 4.4 163,192 3 / 3

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_7 (cost=694.00..4,819.61 rows=36,849 width=8) (actual time=6.027..25.597 rows=163,192 loops=3)

  • Recheck Cond: (stage_id = f_stage_6.id)
  • Heap Blocks: exact=2947
86. 5.711 5.711 ↓ 4.4 163,192 3 / 3

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

  • Index Cond: (stage_id = f_stage_6.id)
87. 13.188 13.188 ↓ 4.0 28 2,826 / 3

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 time=0.004..0.014 rows=28 loops=2,826)

  • Index Cond: (opportunityid_id = f_stagehistory_1.opportunityid_id)
  • Filter: (f_stagehistory_1.stage_id = stage_id)
  • Rows Removed by Filter: 18
88. 1.244 8.475 ↓ 1.1 6,855 1

Hash (cost=312.83..312.83 rows=5,994 width=40) (actual time=8.475..8.475 rows=6,855 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 341kB
89. 1.154 7.231 ↓ 1.1 6,855 1

Subquery Scan on sub_3_1 (cost=177.96..312.83 rows=5,994 width=40) (actual time=3.385..7.231 rows=6,855 loops=1)

90. 5.574 6.077 ↓ 1.1 6,855 1

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual time=3.384..6.077 rows=6,855 loops=1)

  • Group Key: f_stagehistory_3.stage_id, f_stagehistory_3.opportunityid_id
91. 0.503 0.503 ↑ 1.0 6,855 1

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

92. 27.950 27.950 ↓ 4.9 34 650

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 time=0.009..0.043 rows=34 loops=650)

  • Index Cond: (opportunityid_id = sub_3_1.a_990)
  • Filter: (sub_3_1.a_1095 = stage_id)
  • Rows Removed by Filter: 6
93. 28,823.342 49,620.761 ↑ 1.0 1 21,869

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual time=2.268..2.269 rows=1 loops=21,869)

  • Group Key: NULL::integer
94. 20,797.419 20,797.419 ↑ 1.0 7,671 21,869

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

95. 3.283 287.017 ↓ 6.4 5,999 1

Finalize GroupAggregate (cost=18,578.43..18,933.35 rows=936 width=17) (actual time=280.553..287.017 rows=5,999 loops=1)

  • Group Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
  • Filter: (0 < max(1))
96. 7.336 283.734 ↓ 2.6 5,999 1

Gather Merge (cost=18,578.43..18,874.85 rows=2,340 width=16) (actual time=280.547..283.734 rows=5,999 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
97. 0.972 276.398 ↓ 1.7 2,000 3 / 3

Partial GroupAggregate (cost=17,578.41..17,604.74 rows=1,170 width=16) (actual time=275.269..276.398 rows=2,000 loops=3)

  • Group Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
98. 1.268 275.426 ↓ 1.7 2,001 3 / 3

Sort (cost=17,578.41..17,581.34 rows=1,170 width=12) (actual time=275.262..275.426 rows=2,001 loops=3)

  • Sort Key: f_opportunitysnapshot_8.ownerid_id, f_opportunitysnapshot_8.stage_id, f_opportunitysnapshot_8.opportunityid_id
  • Sort Method: quicksort Memory: 199kB
  • Worker 0: Sort Method: quicksort Memory: 136kB
  • Worker 1: Sort Method: quicksort Memory: 140kB
99. 13.720 274.158 ↓ 1.7 2,001 3 / 3

Hash Join (cost=12,153.16..17,518.79 rows=1,170 width=12) (actual time=251.842..274.158 rows=2,001 loops=3)

  • Hash Cond: (f_opportunitysnapshot_8.dt_snapshotdate = sub_7.c_95b863fc9fe5b8d2)
100. 8.641 8.641 ↑ 1.2 98,265 3 / 3

Parallel Seq Scan on f_opportunitysnapshot f_opportunitysnapshot_8 (cost=0.00..4,893.31 rows=122,831 width=16) (actual time=0.012..8.641 rows=98,265 loops=3)

101. 0.008 251.797 ↑ 1.0 1 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
102. 0.001 251.789 ↑ 1.0 1 3 / 3

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

103. 5.152 251.788 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
104. 6.715 246.636 ↓ 198.0 26,536 3 / 3

Nested Loop (cost=11,552.83..12,152.46 rows=134 width=8) (actual time=210.538..246.636 rows=26,536 loops=3)

  • Join Filter: (f_opportunitysnapshot_9.dt_snapshotdate <= (max(f_timeline_4.dt_timeline)))
105. 1.320 2.304 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
106. 0.984 0.984 ↑ 1.0 7,671 3 / 3

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

107. 5.520 237.617 ↓ 66.0 26,536 3 / 3

Nested Loop (cost=11,552.83..11,990.35 rows=402 width=4) (actual time=208.231..237.617 rows=26,536 loops=3)

  • Join Filter: (f_stage_7.id = f_opportunitysnapshot_9.stage_id)
108. 0.821 216.083 ↓ 15.7 942 3 / 3

Nested Loop (cost=11,552.41..11,722.71 rows=60 width=16) (actual time=208.193..216.083 rows=942 loops=3)

  • Join Filter: (sub_1_2.a_1095 = f_stage_7.id)
  • Rows Removed by Join Filter: 4710
109. 0.018 0.018 ↑ 1.0 6 3 / 3

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

  • Filter: (status_id = 7)
  • Rows Removed by Filter: 2
110. 0.576 215.244 ↓ 11.8 942 18 / 3

Materialize (cost=11,552.28..11,703.44 rows=80 width=12) (actual time=34.696..35.874 rows=942 loops=18)

111. 2.890 214.668 ↓ 11.8 942 3 / 3

Hash Join (cost=11,552.28..11,703.04 rows=80 width=12) (actual time=208.173..214.668 rows=942 loops=3)

  • 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)))
  • Rows Removed by Join Filter: 5913
112. 6.556 7.142 ↓ 1.1 6,855 3 / 3

HashAggregate (cost=177.96..252.89 rows=5,994 width=50) (actual time=3.523..7.142 rows=6,855 loops=3)

  • Group Key: f_stagehistory_4.stage_id, f_stagehistory_4.opportunityid_id
113. 0.586 0.586 ↑ 1.0 6,855 3 / 3

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

114. 0.007 204.636 ↑ 1.0 8 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
115. 0.004 204.629 ↑ 1.0 8 3 / 3

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

116. 0.767 204.625 ↑ 1.0 8 3 / 3

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

  • Group Key: f_stagehistory_5.stage_id
117. 0.953 203.858 ↓ 27.5 3,683 3 / 3

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual time=203.615..203.858 rows=3,683 loops=3)

  • Sort Key: f_stagehistory_5.stage_id
  • Sort Method: quicksort Memory: 269kB
  • Worker 0: Sort Method: quicksort Memory: 269kB
  • Worker 1: Sort Method: quicksort Memory: 269kB
118. 2.002 202.905 ↓ 27.5 3,683 3 / 3

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual time=200.249..202.905 rows=3,683 loops=3)

  • Hash Cond: (f_stagehistory_5.opportunityid_id = sub_8.a_990)
119. 0.664 0.664 ↑ 1.0 6,855 3 / 3

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

120. 0.725 200.239 ↓ 28.3 3,311 3 / 3

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual time=200.239..200.239 rows=3,311 loops=3)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 149kB
121. 0.482 199.514 ↓ 28.3 3,311 3 / 3

Subquery Scan on sub_8 (cost=11,214.09..11,222.28 rows=117 width=4) (actual time=197.122..199.514 rows=3,311 loops=3)

122. 1.654 199.032 ↓ 28.3 3,311 3 / 3

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual time=197.122..199.032 rows=3,311 loops=3)

  • Group Key: f_opportunitysnapshot_10.opportunityid_id
  • Filter: (1 <= max(1))
123. 1.276 197.378 ↓ 9.4 3,314 3 / 3

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual time=197.115..197.378 rows=3,314 loops=3)

  • Sort Key: f_opportunitysnapshot_10.opportunityid_id
  • Sort Method: quicksort Memory: 252kB
  • Worker 0: Sort Method: quicksort Memory: 252kB
  • Worker 1: Sort Method: quicksort Memory: 252kB
124. 16.969 196.102 ↓ 9.4 3,314 3 / 3

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual time=124.831..196.102 rows=3,314 loops=3)

  • Hash Cond: (f_opportunitysnapshot_10.dt_snapshotdate = sub_9.c_ea3805e655b4b6c5)
125. 32.761 61.060 ↓ 4.4 163,192 3 / 3

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual time=6.717..61.060 rows=163,192 loops=3)

126. 0.011 0.011 ↑ 1.0 1 3 / 3

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
127. 21.929 28.288 ↓ 4.4 163,192 3 / 3

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_10 (cost=694.00..4,819.61 rows=36,849 width=12) (actual time=6.704..28.288 rows=163,192 loops=3)

  • Recheck Cond: (stage_id = f_stage_8.id)
  • Heap Blocks: exact=2947
128. 6.359 6.359 ↓ 4.4 163,192 3 / 3

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

  • Index Cond: (stage_id = f_stage_8.id)
129. 0.003 118.073 ↑ 1.0 1 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
130. 0.001 118.070 ↑ 1.0 1 3 / 3

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

131. 27.693 118.069 ↑ 1.0 1 3 / 3

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

  • Group Key: NULL::integer
132. 37.152 90.376 ↓ 13.3 163,192 3 / 3

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual time=8.647..90.376 rows=163,192 loops=3)

  • Join Filter: (f_opportunitysnapshot_11.dt_snapshotdate <= (max(f_timeline_5.dt_timeline)))
133. 1.308 2.255 ↑ 1.0 1 3 / 3

GroupAggregate (cost=0.00..157.08 rows=1 width=9) (actual time=2.254..2.255 rows=1 loops=3)

  • Group Key: NULL::integer
134. 0.947 0.947 ↑ 1.0 7,671 3 / 3

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

135. 23.281 50.969 ↓ 4.4 163,192 3 / 3

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual time=6.390..50.969 rows=163,192 loops=3)

136. 0.007 0.007 ↑ 1.0 1 3 / 3

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
137. 21.644 27.681 ↓ 4.4 163,192 3 / 3

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_11 (cost=694.00..4,819.61 rows=36,849 width=8) (actual time=6.381..27.681 rows=163,192 loops=3)

  • Recheck Cond: (stage_id = f_stage_9.id)
  • Heap Blocks: exact=2947
138. 6.037 6.037 ↓ 4.4 163,192 3 / 3

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

  • Index Cond: (stage_id = f_stage_9.id)
139. 16.014 16.014 ↓ 4.0 28 2,826 / 3

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 time=0.005..0.017 rows=28 loops=2,826)

  • Index Cond: (opportunityid_id = f_stagehistory_4.opportunityid_id)
  • Filter: (f_stagehistory_4.stage_id = stage_id)
  • Rows Removed by Filter: 18
140. 0.446 225.306 ↓ 11.8 942 1

Sort (cost=11,806.24..11,806.44 rows=80 width=21) (actual time=225.241..225.306 rows=942 loops=1)

  • Sort Key: f_stagehistory_6.stage_id, f_stagehistory_6.opportunityid_id
  • Sort Method: quicksort Memory: 98kB
141. 2.644 224.860 ↓ 11.8 942 1

Hash Join (cost=11,637.96..11,803.71 rows=80 width=21) (actual time=218.561..224.860 rows=942 loops=1)

  • 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)))
  • Rows Removed by Join Filter: 5913
142. 8.703 9.306 ↓ 1.1 6,855 1

HashAggregate (cost=263.65..353.56 rows=5,994 width=50) (actual time=5.640..9.306 rows=6,855 loops=1)

  • Group Key: f_stagehistory_6.stage_id, f_stagehistory_6.opportunityid_id
143. 0.603 0.603 ↑ 1.0 6,855 1

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

144. 0.006 212.910 ↑ 1.0 8 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
145. 0.004 212.904 ↑ 1.0 8 1

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

146. 0.712 212.900 ↑ 1.0 8 1

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

  • Group Key: f_stagehistory_7.stage_id
147. 0.827 212.188 ↓ 27.5 3,683 1

Sort (cost=11,373.03..11,373.36 rows=134 width=9) (actual time=211.970..212.188 rows=3,683 loops=1)

  • Sort Key: f_stagehistory_7.stage_id
  • Sort Method: quicksort Memory: 269kB
148. 1.794 211.361 ↓ 27.5 3,683 1

Hash Join (cost=11,223.74..11,368.30 rows=134 width=9) (actual time=208.996..211.361 rows=3,683 loops=1)

  • Hash Cond: (f_stagehistory_7.opportunityid_id = sub_10.a_990)
149. 0.590 0.590 ↑ 1.0 6,855 1

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

150. 0.675 208.977 ↓ 28.3 3,311 1

Hash (cost=11,222.28..11,222.28 rows=117 width=4) (actual time=208.977..208.977 rows=3,311 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 149kB
151. 0.450 208.302 ↓ 28.3 3,311 1

Subquery Scan on sub_10 (cost=11,214.09..11,222.28 rows=117 width=4) (actual time=206.038..208.302 rows=3,311 loops=1)

152. 1.570 207.852 ↓ 28.3 3,311 1

GroupAggregate (cost=11,214.09..11,221.11 rows=117 width=9) (actual time=206.038..207.852 rows=3,311 loops=1)

  • Group Key: f_opportunitysnapshot_12.opportunityid_id
  • Filter: (1 <= max(1))
153. 1.163 206.282 ↓ 9.4 3,314 1

Sort (cost=11,214.09..11,214.96 rows=351 width=4) (actual time=206.030..206.282 rows=3,314 loops=1)

  • Sort Key: f_opportunitysnapshot_12.opportunityid_id
  • Sort Method: quicksort Memory: 252kB
154. 16.422 205.119 ↓ 9.4 3,314 1

Hash Join (cost=6,562.35..11,199.25 rows=351 width=4) (actual time=134.956..205.119 rows=3,314 loops=1)

  • Hash Cond: (f_opportunitysnapshot_12.dt_snapshotdate = sub_11.c_ea3805e655b4b6c5)
155. 32.472 61.293 ↓ 4.4 163,192 1

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=8) (actual time=7.506..61.293 rows=163,192 loops=1)

156. 0.007 0.007 ↑ 1.0 1 1

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
157. 21.746 28.814 ↓ 4.4 163,192 1

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_12 (cost=694.00..4,819.61 rows=36,849 width=12) (actual time=7.495..28.814 rows=163,192 loops=1)

  • Recheck Cond: (stage_id = f_stage_10.id)
  • Heap Blocks: exact=2947
158. 7.068 7.068 ↓ 4.4 163,192 1

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

  • Index Cond: (stage_id = f_stage_10.id)
159. 0.003 127.404 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
160. 0.001 127.401 ↑ 1.0 1 1

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

161. 30.354 127.400 ↑ 1.0 1 1

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

  • Group Key: NULL::integer
162. 39.935 97.046 ↓ 13.3 163,192 1

Nested Loop (cost=694.00..5,806.90 rows=12,283 width=8) (actual time=10.003..97.046 rows=163,192 loops=1)

  • Join Filter: (f_opportunitysnapshot_13.dt_snapshotdate <= (max(f_timeline_6.dt_timeline)))
163. 1.501 2.591 ↑ 1.0 1 1

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

  • Group Key: NULL::integer
164. 1.090 1.090 ↑ 1.0 7,671 1

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

165. 24.878 54.520 ↓ 4.4 163,192 1

Nested Loop (cost=694.00..5,189.20 rows=36,849 width=4) (actual time=7.410..54.520 rows=163,192 loops=1)

166. 0.007 0.007 ↑ 1.0 1 1

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

  • Filter: (status_id = 11)
  • Rows Removed by Filter: 7
167. 22.622 29.635 ↓ 4.4 163,192 1

Bitmap Heap Scan on f_opportunitysnapshot f_opportunitysnapshot_13 (cost=694.00..4,819.61 rows=36,849 width=8) (actual time=7.401..29.635 rows=163,192 loops=1)

  • Recheck Cond: (stage_id = f_stage_11.id)
  • Heap Blocks: exact=2947
168. 7.013 7.013 ↓ 4.4 163,192 1

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

  • Index Cond: (stage_id = f_stage_11.id)
169. 0.650 0.650 ↑ 1.0 1 650

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

  • Index Cond: (id = f_opportunitysnapshot.stage_id)
  • Filter: (status_id = 7)
Planning time : 12.068 ms
Execution time : 50,771.082 ms