explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AqJd

Settings
# exclusive inclusive rows x rows loops node
1. 0.273 32,724.519 ↓ 144.0 144 1

GroupAggregate (cost=93,295.71..93,295.72 rows=1 width=156) (actual time=32,724.205..32,724.519 rows=144 loops=1)

  • Group Key: applications_with_stages.stage_order, applications_with_stages._tyeqg, applications_with_stages._tszat, applications_with_stages._tyeqg_value, applications_with_stages._tszat_value, applications_with_stages.interview_stage_id, applications_with_stages.title
2.          

CTE relevant_applications

3. 1.738 521.159 ↓ 1,297.0 1,297 1

Nested Loop (cost=92.39..93,272.94 rows=1 width=804) (actual time=458.543..521.159 rows=1,297 loops=1)

4. 3.024 509.381 ↓ 2,008.0 2,008 1

Nested Loop (cost=92.30..93,272.79 rows=1 width=820) (actual time=458.520..509.381 rows=2,008 loops=1)

5. 2.518 490.377 ↓ 3,995.0 3,995 1

Nested Loop (cost=92.22..93,272.49 rows=1 width=820) (actual time=458.404..490.377 rows=3,995 loops=1)

6. 0.954 460.451 ↓ 571.0 4,568 1

Subquery Scan on "ANY_subquery" (cost=92.13..93,239.76 rows=8 width=16) (actual time=458.341..460.451 rows=4,568 loops=1)

7. 9.608 459.497 ↓ 571.0 4,568 1

HashSetOp Intersect (cost=92.13..93,239.74 rows=8 width=20) (actual time=458.340..459.497 rows=4,568 loops=1)

8. 4.277 449.889 ↓ 2.2 39,742 1

Append (cost=92.13..93,230.83 rows=17,825 width=20) (actual time=0.396..449.889 rows=39,742 loops=1)

9. 0.563 19.470 ↓ 573.2 4,586 1

Subquery Scan on "*SELECT* 8" (cost=92.13..6,384.85 rows=8 width=20) (actual time=0.395..19.470 rows=4,586 loops=1)

10. 3.083 18.907 ↓ 573.2 4,586 1

Nested Loop (cost=92.13..6,384.83 rows=8 width=16) (actual time=0.395..18.907 rows=4,586 loops=1)

11. 1.744 2.066 ↓ 33.0 4,586 1

Bitmap Heap Scan on process_user_roles (cost=92.05..5,820.32 rows=139 width=16) (actual time=0.384..2.066 rows=4,586 loops=1)

  • Recheck Cond: ((user_id = 'd419fa47-df37-4c74-aa40-0f983629ab32'::uuid) OR (user_id = '44664ef6-dabe-4b95-95c8-41b130191b48'::uuid) OR (user_id = 'fd513730-0180-4c21-8977-2fef0c5528d7'::uuid) OR (user_id = '603ae474-de1c-466a-835e-da22ee5a43c8'::uuid) OR (user_id = 'b9ca40c2-e805-4ca9-bc0a-68a83e646a0c'::uuid) OR (user_id = 'a25e3978-1cfd-45f4-b2bf-0642249aaa31'::uuid))
  • Filter: (process_role_type_id = '9788ef71-46b1-494b-a9e5-c3d8d2d84733'::uuid)
  • Rows Removed by Filter: 9
  • Heap Blocks: exact=493
12. 0.002 0.322 ↓ 0.0 0 1

BitmapOr (cost=92.05..92.05 rows=4,997 width=0) (actual time=0.322..0.322 rows=0 loops=1)

13. 0.152 0.152 ↓ 1.1 2,395 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..39.47 rows=2,254 width=0) (actual time=0.152..0.152 rows=2,395 loops=1)

  • Index Cond: (user_id = 'd419fa47-df37-4c74-aa40-0f983629ab32'::uuid)
14. 0.122 0.122 ↑ 1.1 1,798 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..35.03 rows=1,964 width=0) (actual time=0.122..0.122 rows=1,798 loops=1)

  • Index Cond: (user_id = '44664ef6-dabe-4b95-95c8-41b130191b48'::uuid)
15. 0.013 0.013 ↑ 1.1 179 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..4.38 rows=195 width=0) (actual time=0.013..0.013 rows=179 loops=1)

  • Index Cond: (user_id = 'fd513730-0180-4c21-8977-2fef0c5528d7'::uuid)
16. 0.013 0.013 ↑ 1.4 139 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..4.38 rows=195 width=0) (actual time=0.013..0.013 rows=139 loops=1)

  • Index Cond: (user_id = '603ae474-de1c-466a-835e-da22ee5a43c8'::uuid)
17. 0.011 0.011 ↑ 1.9 104 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..4.38 rows=195 width=0) (actual time=0.011..0.011 rows=104 loops=1)

  • Index Cond: (user_id = 'b9ca40c2-e805-4ca9-bc0a-68a83e646a0c'::uuid)
18. 0.009 0.009 ↑ 3.2 61 1

Bitmap Index Scan on process_user_roles_user_id_idx (cost=0.00..4.38 rows=195 width=0) (actual time=0.009..0.009 rows=61 loops=1)

  • Index Cond: (user_id = 'a25e3978-1cfd-45f4-b2bf-0642249aaa31'::uuid)
19. 13.758 13.758 ↑ 1.0 1 4,586

Index Scan using application_pkey on application application_1 (cost=0.08..4.06 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=4,586)

  • Index Cond: (id = process_user_roles.process_id)
  • Filter: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
20. 17.487 426.142 ↓ 2.0 35,156 1

HashAggregate (cost=86,765.79..86,819.24 rows=17,817 width=20) (actual time=417.161..426.142 rows=35,156 loops=1)

  • Group Key: ""*SELECT* 2"".id
21. 2.148 408.655 ↓ 2.0 35,156 1

Append (cost=0.08..86,756.88 rows=17,817 width=16) (actual time=94.613..408.655 rows=35,156 loops=1)

22. 3.483 101.476 ↓ 2.0 34,973 1

Result (cost=0.08..22,658.70 rows=17,455 width=16) (actual time=94.613..101.476 rows=34,973 loops=1)

23. 21.520 97.993 ↓ 2.0 34,973 1

HashSetOp Intersect (cost=0.08..22,606.34 rows=17,455 width=20) (actual time=94.611..97.993 rows=34,973 loops=1)

24. 4.664 76.473 ↑ 1.0 70,168 1

Append (cost=0.08..22,570.86 rows=70,959 width=20) (actual time=0.014..76.473 rows=70,168 loops=1)

25. 3.583 27.045 ↓ 2.0 35,012 1

Subquery Scan on "*SELECT* 2" (cost=0.08..17,677.73 rows=17,455 width=20) (actual time=0.014..27.045 rows=35,012 loops=1)

26. 23.462 23.462 ↓ 2.0 35,012 1

Index Scan using application_organization_id_idx on application application_2 (cost=0.08..17,625.36 rows=17,455 width=16) (actual time=0.013..23.462 rows=35,012 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: COALESCE((status <> 'hired'::enum_application_status), true)
  • Rows Removed by Filter: 183
27. 2.981 44.764 ↑ 1.5 35,156 1

Subquery Scan on "*SELECT* 1" (cost=4,465.67..4,786.69 rows=53,504 width=20) (actual time=36.409..44.764 rows=35,156 loops=1)

28. 16.598 41.783 ↑ 1.5 35,156 1

HashAggregate (cost=4,465.67..4,626.18 rows=53,504 width=16) (actual time=36.408..41.783 rows=35,156 loops=1)

  • Group Key: application_3.id
29. 3.627 25.185 ↑ 1.5 35,156 1

Nested Loop (cost=1,043.72..4,438.92 rows=53,504 width=16) (actual time=0.422..25.185 rows=35,156 loops=1)

30. 0.459 1.428 ↑ 2.2 110 1

Hash Join (cost=1,043.63..1,201.07 rows=237 width=32) (actual time=0.404..1.428 rows=110 loops=1)

  • Hash Cond: (job.id = job_1.id)
31. 0.633 0.633 ↑ 1.0 3,962 1

Seq Scan on job (cost=0.00..155.28 rows=4,095 width=16) (actual time=0.010..0.633 rows=3,962 loops=1)

32. 0.017 0.336 ↑ 2.2 110 1

Hash (cost=1,042.80..1,042.80 rows=237 width=16) (actual time=0.336..0.336 rows=110 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
33. 0.053 0.319 ↑ 2.2 110 1

HashAggregate (cost=1,041.38..1,042.09 rows=237 width=16) (actual time=0.302..0.319 rows=110 loops=1)

  • Group Key: job_1.id
34. 0.009 0.266 ↑ 2.2 110 1

Append (cost=2.24..1,041.26 rows=237 width=16) (actual time=0.029..0.266 rows=110 loops=1)

35. 0.074 0.093 ↑ 1.1 110 1

Bitmap Heap Scan on job job_1 (cost=2.24..106.27 rows=117 width=16) (actual time=0.029..0.093 rows=110 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (NOT confidential)
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=26
36. 0.019 0.019 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.019..0.019 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
37. 0.001 0.049 ↓ 0.0 0 1

Nested Loop (cost=0.08..15.83 rows=1 width=16) (actual time=0.049..0.049 rows=0 loops=1)

38. 0.000 0.048 ↓ 0.0 0 1

Nested Loop (cost=0.03..11.71 rows=1 width=16) (actual time=0.048..0.048 rows=0 loops=1)

39. 0.048 0.048 ↓ 0.0 0 1

Seq Scan on user_job_security_roles (cost=0.00..7.60 rows=1 width=32) (actual time=0.048..0.048 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 408
40. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles.role_id)
  • Filter: can_see_candidates
41. 0.000 0.000 ↓ 0.0 0

Index Scan using job_pkey on job job_2 (cost=0.06..4.06 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles.job_id)
  • Filter: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
42. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=2.29..592.59 rows=1 width=16) (actual time=0.014..0.014 rows=0 loops=1)

  • Join Filter: (user_team_security_roles.role_id = security_role_1.id)
43. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=2.29..587.85 rows=1 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Join Filter: (team_3.path @> (SubPlan 1))
44. 0.000 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.05..6.27 rows=1 width=86) (actual time=0.013..0.013 rows=0 loops=1)

45. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on user_team_security_roles (cost=0.00..2.19 rows=1 width=32) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 81
46. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team team_3 (cost=0.05..4.06 rows=1 width=86) (never executed)

  • Index Cond: (id = user_team_security_roles.team_id)
47. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_3 (cost=2.24..106.27 rows=117 width=32) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
48. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
49.          

SubPlan (for Nested Loop)

50. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team (cost=0.05..4.06 rows=1 width=70) (never executed)

  • Index Cond: (id = job_3.team_id)
51. 0.000 0.000 ↓ 0.0 0

Seq Scan on security_role security_role_1 (cost=0.00..4.34 rows=115 width=16) (never executed)

  • Filter: can_see_candidates
52. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=2.27..112.91 rows=117 width=16) (actual time=0.010..0.010 rows=0 loops=1)

53. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.03..6.29 rows=1 width=0) (actual time=0.010..0.010 rows=0 loops=1)

54. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_1 (cost=0.00..2.19 rows=1 width=16) (actual time=0.009..0.009 rows=0 loops=1)

  • Filter: ((team_id IS NULL) AND (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid))
  • Rows Removed by Filter: 81
55. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role security_role_2 (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_team_security_roles_1.role_id)
  • Filter: can_see_candidates
56. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_4 (cost=2.24..106.27 rows=117 width=16) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
57. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
58. 0.001 0.091 ↓ 0.0 0 1

Result (cost=2.23..212.59 rows=1 width=16) (actual time=0.091..0.091 rows=0 loops=1)

59. 0.003 0.090 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.23..212.59 rows=1 width=20) (actual time=0.090..0.090 rows=0 loops=1)

60. 0.001 0.087 ↓ 2.0 4 1

Append (cost=2.23..212.59 rows=2 width=20) (actual time=0.023..0.087 rows=4 loops=1)

61. 0.001 0.045 ↓ 4.0 4 1

Subquery Scan on "*SELECT* 5" (cost=2.23..106.26 rows=1 width=20) (actual time=0.022..0.045 rows=4 loops=1)

62. 0.033 0.044 ↓ 4.0 4 1

Bitmap Heap Scan on job job_5 (cost=2.23..106.26 rows=1 width=16) (actual time=0.022..0.044 rows=4 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 110
  • Heap Blocks: exact=26
63. 0.011 0.011 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.011..0.011 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
64. 0.001 0.041 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 6_1" (cost=2.23..106.32 rows=1 width=20) (actual time=0.041..0.041 rows=0 loops=1)

65. 0.031 0.040 ↓ 0.0 0 1

Bitmap Heap Scan on job job_6 (cost=2.23..106.32 rows=1 width=16) (actual time=0.040..0.040 rows=0 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (author_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 114
  • Heap Blocks: exact=26
66. 0.009 0.009 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.009..0.009 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
67. 20.130 20.130 ↓ 1.4 320 110

Index Scan using application_job_id_idx on application application_3 (cost=0.08..12.98 rows=226 width=32) (actual time=0.006..0.183 rows=320 loops=110)

  • Index Cond: (job_id = job.id)
68. 0.031 305.031 ↑ 2.0 183 1

Result (cost=54,013.62..64,071.45 rows=362 width=16) (actual time=304.980..305.031 rows=183 loops=1)

69. 5.176 305.000 ↑ 2.0 183 1

HashSetOp Intersect (cost=54,013.62..64,070.36 rows=362 width=20) (actual time=304.979..305.000 rows=183 loops=1)

70. 3.420 299.824 ↑ 1.5 35,339 1

Append (cost=54,013.62..64,043.43 rows=53,866 width=20) (actual time=105.729..299.824 rows=35,339 loops=1)

71. 0.134 105.773 ↑ 2.0 183 1

HashAggregate (cost=54,013.62..54,014.71 rows=362 width=20) (actual time=105.728..105.773 rows=183 loops=1)

  • Group Key: application_4.id
72. 0.024 105.639 ↑ 2.0 183 1

Append (cost=18,137.09..54,013.44 rows=362 width=16) (actual time=37.912..105.639 rows=183 loops=1)

73. 3.850 43.768 ↑ 2.0 2 1

Merge Join (cost=18,137.09..18,170.98 rows=4 width=16) (actual time=37.911..43.768 rows=2 loops=1)

  • Merge Cond: (employee.candidate_id = application_4.candidate_id)
74. 0.051 0.051 ↑ 378.8 36 1

Index Scan using employee_candidate_id_idx on employee (cost=0.06..597.86 rows=13,636 width=16) (actual time=0.018..0.051 rows=36 loops=1)

  • Filter: ((NOT is_alumni) AND (user_id IS DISTINCT FROM '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid))
75. 19.260 39.867 ↑ 1.1 32,476 1

Sort (cost=18,134.76..18,152.22 rows=34,911 width=32) (actual time=36.849..39.867 rows=32,476 loops=1)

  • Sort Key: application_4.candidate_id
  • Sort Method: quicksort Memory: 4,286kB
76. 20.607 20.607 ↓ 1.0 35,195 1

Index Scan using application_organization_id_idx on application application_4 (cost=0.08..17,607.91 rows=34,911 width=32) (actual time=0.015..20.607 rows=35,195 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
77. 0.033 61.847 ↑ 2.0 181 1

Result (cost=0.08..35,841.90 rows=358 width=16) (actual time=61.788..61.847 rows=181 loops=1)

78. 3.813 61.814 ↑ 2.0 181 1

HashSetOp Intersect (cost=0.08..35,840.83 rows=358 width=20) (actual time=61.787..61.814 rows=181 loops=1)

79. 2.472 58.001 ↓ 1.0 35,376 1

Append (cost=0.08..35,823.20 rows=35,265 width=20) (actual time=0.071..58.001 rows=35,376 loops=1)

80. 0.025 20.747 ↑ 2.0 183 1

Subquery Scan on "*SELECT* 7" (cost=0.08..17,626.44 rows=358 width=20) (actual time=0.071..20.747 rows=183 loops=1)

81. 20.722 20.722 ↑ 2.0 183 1

Index Scan using application_organization_id_idx on application application_5 (cost=0.08..17,625.36 rows=358 width=16) (actual time=0.070..20.722 rows=183 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (status = 'hired'::enum_application_status)
  • Rows Removed by Filter: 35,012
82. 3.575 34.782 ↓ 1.0 35,193 1

Subquery Scan on "*SELECT* 6" (cost=307.79..18,143.86 rows=34,907 width=20) (actual time=2.941..34.782 rows=35,193 loops=1)

83. 9.112 31.207 ↓ 1.0 35,193 1

Hash Anti Join (cost=307.79..18,039.14 rows=34,907 width=16) (actual time=2.940..31.207 rows=35,193 loops=1)

  • Hash Cond: (application_6.candidate_id = employee_1.candidate_id)
84. 19.203 19.203 ↓ 1.0 35,195 1

Index Scan using application_organization_id_idx on application application_6 (cost=0.08..17,607.91 rows=34,911 width=32) (actual time=0.014..19.203 rows=35,195 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
85. 0.650 2.892 ↑ 389.6 35 1

Hash (cost=259.97..259.97 rows=13,637 width=16) (actual time=2.892..2.892 rows=35 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 130kB
86. 2.242 2.242 ↑ 1.0 13,616 1

Seq Scan on employee employee_1 (cost=0.00..259.97 rows=13,637 width=16) (actual time=0.011..2.242 rows=13,616 loops=1)

  • Filter: (NOT is_alumni)
  • Rows Removed by Filter: 21
87. 5.665 190.631 ↑ 1.5 35,156 1

Result (cost=4,465.67..9,947.92 rows=53,504 width=20) (actual time=181.386..190.631 rows=35,156 loops=1)

88. 31.450 184.966 ↑ 1.5 35,156 1

HashSetOp Intersect (cost=4,465.67..9,787.41 rows=53,504 width=20) (actual time=181.385..184.966 rows=35,156 loops=1)

89. 7.271 153.516 ↑ 1.5 70,312 1

Append (cost=4,465.67..9,733.91 rows=107,008 width=20) (actual time=58.964..153.516 rows=70,312 loops=1)

90. 5.088 74.230 ↑ 1.5 35,156 1

Subquery Scan on "*SELECT* 3" (cost=4,465.67..4,786.69 rows=53,504 width=20) (actual time=58.963..74.230 rows=35,156 loops=1)

91. 27.619 69.142 ↑ 1.5 35,156 1

HashAggregate (cost=4,465.67..4,626.18 rows=53,504 width=16) (actual time=58.962..69.142 rows=35,156 loops=1)

  • Group Key: application_7.id
92. 6.600 41.523 ↑ 1.5 35,156 1

Nested Loop (cost=1,043.72..4,438.92 rows=53,504 width=16) (actual time=0.709..41.523 rows=35,156 loops=1)

93. 0.855 2.473 ↑ 2.2 110 1

Hash Join (cost=1,043.63..1,201.07 rows=237 width=32) (actual time=0.681..2.473 rows=110 loops=1)

  • Hash Cond: (job_7.id = job_8.id)
94. 1.050 1.050 ↑ 1.0 3,962 1

Seq Scan on job job_7 (cost=0.00..155.28 rows=4,095 width=16) (actual time=0.013..1.050 rows=3,962 loops=1)

95. 0.035 0.568 ↑ 2.2 110 1

Hash (cost=1,042.80..1,042.80 rows=237 width=16) (actual time=0.568..0.568 rows=110 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
96. 0.085 0.533 ↑ 2.2 110 1

HashAggregate (cost=1,041.38..1,042.09 rows=237 width=16) (actual time=0.504..0.533 rows=110 loops=1)

  • Group Key: job_8.id
97. 0.014 0.448 ↑ 2.2 110 1

Append (cost=2.24..1,041.26 rows=237 width=16) (actual time=0.037..0.448 rows=110 loops=1)

98. 0.110 0.134 ↑ 1.1 110 1

Bitmap Heap Scan on job job_8 (cost=2.24..106.27 rows=117 width=16) (actual time=0.036..0.134 rows=110 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (NOT confidential)
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=26
99. 0.024 0.024 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.024..0.024 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
100. 0.001 0.087 ↓ 0.0 0 1

Nested Loop (cost=0.08..15.83 rows=1 width=16) (actual time=0.087..0.087 rows=0 loops=1)

101. 0.000 0.086 ↓ 0.0 0 1

Nested Loop (cost=0.03..11.71 rows=1 width=16) (actual time=0.086..0.086 rows=0 loops=1)

102. 0.086 0.086 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles_1 (cost=0.00..7.60 rows=1 width=32) (actual time=0.086..0.086 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 408
103. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role security_role_3 (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles_1.role_id)
  • Filter: can_see_candidates
104. 0.000 0.000 ↓ 0.0 0

Index Scan using job_pkey on job job_9 (cost=0.06..4.06 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles_1.job_id)
  • Filter: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
105. 0.001 0.023 ↓ 0.0 0 1

Nested Loop (cost=2.29..592.59 rows=1 width=16) (actual time=0.023..0.023 rows=0 loops=1)

  • Join Filter: (user_team_security_roles_2.role_id = security_role_4.id)
106. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=2.29..587.85 rows=1 width=32) (actual time=0.022..0.022 rows=0 loops=1)

  • Join Filter: (team_4.path @> (SubPlan 2))
107. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.05..6.27 rows=1 width=86) (actual time=0.022..0.022 rows=0 loops=1)

108. 0.022 0.022 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_2 (cost=0.00..2.19 rows=1 width=32) (actual time=0.022..0.022 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 81
109. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team team_4 (cost=0.05..4.06 rows=1 width=86) (never executed)

  • Index Cond: (id = user_team_security_roles_2.team_id)
110. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_10 (cost=2.24..106.27 rows=117 width=32) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
111. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
112.          

SubPlan (for Nested Loop)

113. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team team_1 (cost=0.05..4.06 rows=1 width=70) (never executed)

  • Index Cond: (id = job_10.team_id)
114. 0.000 0.000 ↓ 0.0 0

Seq Scan on security_role security_role_4 (cost=0.00..4.34 rows=115 width=16) (never executed)

  • Filter: can_see_candidates
115. 0.001 0.018 ↓ 0.0 0 1

Nested Loop (cost=2.27..112.91 rows=117 width=16) (actual time=0.018..0.018 rows=0 loops=1)

116. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.03..6.29 rows=1 width=0) (actual time=0.017..0.017 rows=0 loops=1)

117. 0.017 0.017 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_3 (cost=0.00..2.19 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=1)

  • Filter: ((team_id IS NULL) AND (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid))
  • Rows Removed by Filter: 81
118. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role security_role_5 (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_team_security_roles_3.role_id)
  • Filter: can_see_candidates
119. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_11 (cost=2.24..106.27 rows=117 width=16) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
120. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
121. 0.001 0.172 ↓ 0.0 0 1

Result (cost=2.23..212.59 rows=1 width=16) (actual time=0.172..0.172 rows=0 loops=1)

122. 0.004 0.171 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.23..212.59 rows=1 width=20) (actual time=0.171..0.171 rows=0 loops=1)

123. 0.002 0.167 ↓ 2.0 4 1

Append (cost=2.23..212.59 rows=2 width=20) (actual time=0.040..0.167 rows=4 loops=1)

124. 0.002 0.084 ↓ 4.0 4 1

Subquery Scan on "*SELECT* 5_1" (cost=2.23..106.26 rows=1 width=20) (actual time=0.039..0.084 rows=4 loops=1)

125. 0.064 0.082 ↓ 4.0 4 1

Bitmap Heap Scan on job job_12 (cost=2.23..106.26 rows=1 width=16) (actual time=0.038..0.082 rows=4 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 110
  • Heap Blocks: exact=26
126. 0.018 0.018 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.018..0.018 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
127. 0.000 0.081 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 6_2" (cost=2.23..106.32 rows=1 width=20) (actual time=0.081..0.081 rows=0 loops=1)

128. 0.064 0.081 ↓ 0.0 0 1

Bitmap Heap Scan on job job_13 (cost=2.23..106.32 rows=1 width=16) (actual time=0.081..0.081 rows=0 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (author_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 114
  • Heap Blocks: exact=26
129. 0.017 0.017 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.017..0.017 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
130. 32.450 32.450 ↓ 1.4 320 110

Index Scan using application_job_id_idx on application application_7 (cost=0.08..12.98 rows=226 width=32) (actual time=0.011..0.295 rows=320 loops=110)

  • Index Cond: (job_id = job_7.id)
131. 5.141 72.015 ↑ 1.5 35,156 1

Subquery Scan on "*SELECT* 4" (cost=4,465.68..4,786.70 rows=53,504 width=20) (actual time=57.037..72.015 rows=35,156 loops=1)

132. 26.293 66.874 ↑ 1.5 35,156 1

HashAggregate (cost=4,465.68..4,626.19 rows=53,504 width=16) (actual time=57.035..66.874 rows=35,156 loops=1)

  • Group Key: application_8.id
133. 6.339 40.581 ↑ 1.5 35,156 1

Nested Loop (cost=1,043.73..4,438.93 rows=53,504 width=16) (actual time=0.736..40.581 rows=35,156 loops=1)

134. 0.845 2.452 ↑ 2.2 110 1

Hash Join (cost=1,043.64..1,201.08 rows=237 width=32) (actual time=0.705..2.452 rows=110 loops=1)

  • Hash Cond: (job_14.id = job_15.id)
135. 1.034 1.034 ↑ 1.0 3,962 1

Seq Scan on job job_14 (cost=0.00..155.28 rows=4,095 width=16) (actual time=0.015..1.034 rows=3,962 loops=1)

136. 0.037 0.573 ↑ 2.2 110 1

Hash (cost=1,042.81..1,042.81 rows=237 width=16) (actual time=0.573..0.573 rows=110 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
137. 0.082 0.536 ↑ 2.2 110 1

HashAggregate (cost=1,041.39..1,042.10 rows=237 width=16) (actual time=0.508..0.536 rows=110 loops=1)

  • Group Key: job_15.id
138. 0.016 0.454 ↑ 2.2 110 1

Append (cost=2.24..1,041.27 rows=237 width=16) (actual time=0.045..0.454 rows=110 loops=1)

139. 0.108 0.140 ↑ 1.1 110 1

Bitmap Heap Scan on job job_15 (cost=2.24..106.27 rows=117 width=16) (actual time=0.044..0.140 rows=110 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (NOT confidential)
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=26
140. 0.032 0.032 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.032..0.032 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
141. 0.000 0.086 ↓ 0.0 0 1

Nested Loop (cost=0.08..15.98 rows=1 width=16) (actual time=0.086..0.086 rows=0 loops=1)

142. 0.001 0.086 ↓ 0.0 0 1

Nested Loop (cost=0.03..11.85 rows=1 width=16) (actual time=0.086..0.086 rows=0 loops=1)

143. 0.085 0.085 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles_2 (cost=0.00..7.60 rows=1 width=32) (actual time=0.085..0.085 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 408
144. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role security_role_6 (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles_2.role_id)
  • Filter: can_see_and_edit_hired_candidates
145. 0.000 0.000 ↓ 0.0 0

Index Scan using job_pkey on job job_16 (cost=0.06..4.06 rows=1 width=16) (never executed)

  • Index Cond: (id = user_job_security_roles_2.job_id)
  • Filter: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
146. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=2.29..592.32 rows=1 width=16) (actual time=0.022..0.022 rows=0 loops=1)

  • Join Filter: (user_team_security_roles_4.role_id = security_role_7.id)
147. 0.001 0.022 ↓ 0.0 0 1

Nested Loop (cost=2.29..587.85 rows=1 width=32) (actual time=0.021..0.022 rows=0 loops=1)

  • Join Filter: (team_5.path @> (SubPlan 3))
148. 0.001 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.05..6.27 rows=1 width=86) (actual time=0.021..0.021 rows=0 loops=1)

149. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_4 (cost=0.00..2.19 rows=1 width=32) (actual time=0.020..0.020 rows=0 loops=1)

  • Filter: (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 81
150. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team team_5 (cost=0.05..4.06 rows=1 width=86) (never executed)

  • Index Cond: (id = user_team_security_roles_4.team_id)
151. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_17 (cost=2.24..106.27 rows=117 width=32) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
152. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
153.          

SubPlan (for Nested Loop)

154. 0.000 0.000 ↓ 0.0 0

Index Scan using team_pkey on team team_2 (cost=0.05..4.06 rows=1 width=70) (never executed)

  • Index Cond: (id = job_17.team_id)
155. 0.000 0.000 ↓ 0.0 0

Seq Scan on security_role security_role_7 (cost=0.00..4.34 rows=37 width=16) (never executed)

  • Filter: can_see_and_edit_hired_candidates
156. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=2.27..113.05 rows=117 width=16) (actual time=0.016..0.016 rows=0 loops=1)

157. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=0.03..6.43 rows=1 width=0) (actual time=0.016..0.016 rows=0 loops=1)

158. 0.015 0.015 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_5 (cost=0.00..2.19 rows=1 width=16) (actual time=0.015..0.015 rows=0 loops=1)

  • Filter: ((team_id IS NULL) AND (user_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid))
  • Rows Removed by Filter: 81
159. 0.000 0.000 ↓ 0.0 0

Index Scan using security_role_pkey on security_role security_role_8 (cost=0.03..4.03 rows=1 width=16) (never executed)

  • Index Cond: (id = user_team_security_roles_5.role_id)
  • Filter: can_see_and_edit_hired_candidates
160. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on job job_18 (cost=2.24..106.27 rows=117 width=16) (never executed)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
161. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (never executed)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
162. 0.001 0.174 ↓ 0.0 0 1

Result (cost=2.23..212.59 rows=1 width=16) (actual time=0.174..0.174 rows=0 loops=1)

163. 0.004 0.173 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.23..212.59 rows=1 width=20) (actual time=0.173..0.173 rows=0 loops=1)

164. 0.002 0.169 ↓ 2.0 4 1

Append (cost=2.23..212.59 rows=2 width=20) (actual time=0.044..0.169 rows=4 loops=1)

165. 0.002 0.085 ↓ 4.0 4 1

Subquery Scan on "*SELECT* 5_2" (cost=2.23..106.26 rows=1 width=20) (actual time=0.043..0.085 rows=4 loops=1)

166. 0.060 0.083 ↓ 4.0 4 1

Bitmap Heap Scan on job job_19 (cost=2.23..106.26 rows=1 width=16) (actual time=0.042..0.083 rows=4 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 110
  • Heap Blocks: exact=26
167. 0.023 0.023 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.023..0.023 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
168. 0.000 0.082 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 6_3" (cost=2.23..106.32 rows=1 width=20) (actual time=0.082..0.082 rows=0 loops=1)

169. 0.060 0.082 ↓ 0.0 0 1

Bitmap Heap Scan on job job_20 (cost=2.23..106.32 rows=1 width=16) (actual time=0.082..0.082 rows=0 loops=1)

  • Recheck Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
  • Filter: (author_id = '5b7dc471-c25c-47a6-8c56-8d404754d00d'::uuid)
  • Rows Removed by Filter: 114
  • Heap Blocks: exact=26
170. 0.022 0.022 ↑ 1.0 114 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.23 rows=117 width=0) (actual time=0.022..0.022 rows=114 loops=1)

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
171. 31.790 31.790 ↓ 1.4 320 110

Index Scan using application_job_id_idx on application application_8 (cost=0.08..12.98 rows=226 width=32) (actual time=0.010..0.289 rows=320 loops=110)

  • Index Cond: (job_id = job_14.id)
172. 27.408 27.408 ↑ 1.0 1 4,568

Index Scan using application_pkey on application (cost=0.08..4.09 rows=1 width=804) (actual time=0.006..0.006 rows=1 loops=4,568)

  • Index Cond: (id = ""ANY_subquery"".id)
  • Filter: ((organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid) AND ((status = 'archived'::enum_application_status) OR (status = 'hired'::enum_application_status)))
  • Rows Removed by Filter: 0
173. 15.980 15.980 ↑ 3.0 1 3,995

Index Scan using scheduled_interview_event_application_id_idx on scheduled_interview_event scheduled_interview_event_wzzxi (cost=0.08..0.29 rows=3 width=32) (actual time=0.004..0.004 rows=1 loops=3,995)

  • Index Cond: (application_id = application.id)
174. 10.040 10.040 ↑ 1.0 1 2,008

Index Scan using interview_event_pkey on interview_event interview_event_wzzxi (cost=0.08..0.15 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=2,008)

  • Index Cond: (id = scheduled_interview_event_wzzxi.interview_event_id)
  • Filter: ((start_time >= '2020-01-01 08:00:00+00'::timestamp with time zone) AND (start_time <= '2021-01-01 07:59:59.999+00'::timestamp with time zone))
  • Rows Removed by Filter: 0
175.          

CTE applications_with_stages

176. 5.403 32,722.898 ↓ 943.0 943 1

Unique (cost=22.76..22.76 rows=1 width=177) (actual time=32,714.123..32,722.898 rows=943 loops=1)

177. 59.774 32,717.495 ↓ 64,824.0 64,824 1

Sort (cost=22.76..22.76 rows=1 width=177) (actual time=32,714.122..32,717.495 rows=64,824 loops=1)

  • Sort Key: application_9.id, interview_stage_group_type.id
  • Sort Method: quicksort Memory: 18,669kB
178. 78.753 32,657.721 ↓ 64,824.0 64,824 1

Nested Loop (cost=6.73..22.76 rows=1 width=177) (actual time=580.099..32,657.721 rows=64,824 loops=1)

179. 1,074.122 32,449.320 ↓ 64,824.0 64,824 1

Nested Loop (cost=6.70..20.72 rows=1 width=135) (actual time=580.070..32,449.320 rows=64,824 loops=1)

  • Join Filter: (relevant_applications.id = relevant_applications_1.id)
  • Rows Removed by Join Filter: 16,930,901
180. 826.702 2,463.694 ↓ 64,824.0 64,824 1

Nested Loop (cost=0.40..14.41 rows=1 width=179) (actual time=458.728..2,463.694 rows=64,824 loops=1)

  • Join Filter: (application_history.application_id = relevant_applications.id)
  • Rows Removed by Join Filter: 10,523,884
181. 10.715 714.460 ↓ 8,164.0 8,164 1

Nested Loop Left Join (cost=0.40..14.40 rows=1 width=163) (actual time=458.724..714.460 rows=8,164 loops=1)

182. 6.000 695.581 ↓ 8,164.0 8,164 1

Nested Loop Left Join (cost=0.37..14.36 rows=1 width=170) (actual time=458.704..695.581 rows=8,164 loops=1)

183. 10.275 673.253 ↓ 8,164.0 8,164 1

Nested Loop (cost=0.31..10.30 rows=1 width=126) (actual time=458.686..673.253 rows=8,164 loops=1)

184. 9.731 646.650 ↓ 8,164.0 8,164 1

Nested Loop (cost=0.26..10.19 rows=1 width=113) (actual time=458.668..646.650 rows=8,164 loops=1)

  • Join Filter: (interview_stage_group_type.""order"" <= current_stage_group_app_history.""order"")
  • Rows Removed by Join Filter: 15,116
185. 5.228 536.039 ↓ 3,880.0 3,880 1

Nested Loop (cost=0.26..6.45 rows=1 width=84) (actual time=458.641..536.039 rows=3,880 loops=1)

186. 5.175 526.931 ↓ 3,880.0 3,880 1

Nested Loop (cost=0.23..6.41 rows=1 width=96) (actual time=458.624..526.931 rows=3,880 loops=1)

187. 0.964 502.511 ↓ 6,415.0 6,415 1

Nested Loop (cost=0.17..6.35 rows=1 width=96) (actual time=458.602..502.511 rows=6,415 loops=1)

188. 2.742 475.887 ↓ 3,207.5 6,415 1

Nested Loop (cost=0.09..6.11 rows=2 width=64) (actual time=458.580..475.887 rows=6,415 loops=1)

189. 458.878 458.878 ↓ 1,297.0 1,297 1

CTE Scan on relevant_applications application_9 (cost=0.00..0.01 rows=1 width=32) (actual time=458.548..458.878 rows=1,297 loops=1)

190. 14.267 14.267 ↓ 2.5 5 1,297

Index Scan using application_history_application_id_idx on application_history (cost=0.09..6.09 rows=2 width=32) (actual time=0.005..0.011 rows=5 loops=1,297)

  • Index Cond: (application_id = application_9.id)
191. 25.660 25.660 ↑ 1.0 1 6,415

Index Scan using process_user_roles_process_id_idx on process_user_roles process_user_roles_itwug (cost=0.08..0.12 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=6,415)

  • Index Cond: (process_id = application_history.application_id)
  • Filter: (process_role_type_id = '9788ef71-46b1-494b-a9e5-c3d8d2d84733'::uuid)
  • Rows Removed by Filter: 0
192. 19.245 19.245 ↑ 1.0 1 6,415

Index Scan using interview_stage_pkey on interview_stage current_stage_app_history (cost=0.06..0.06 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6,415)

  • Index Cond: (id = application_history.new_interview_stage_id)
  • Filter: ((stage_type <> 'Archived'::enum_interview_stage_stage_type) AND (stage_type <> 'PreInterviewScreen'::enum_interview_stage_stage_type))
  • Rows Removed by Filter: 0
193. 3.880 3.880 ↑ 1.0 1 3,880

Index Scan using interview_stage_group_type_pkey on interview_stage_group_type current_stage_group_app_history (cost=0.03..0.03 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=3,880)

  • Index Cond: (id = current_stage_app_history.interview_stage_group_id)
  • Filter: is_relevant_for_funnel
194. 100.880 100.880 ↑ 1.0 6 3,880

Seq Scan on interview_stage_group_type (cost=0.00..3.72 rows=6 width=33) (actual time=0.004..0.026 rows=6 loops=3,880)

  • Filter: (is_relevant_for_funnel AND (stage_type IS DISTINCT FROM 'Archived'::enum_interview_stage_group_type_stage_type) AND (stage_type IS DISTINCT FROM 'PreInterviewScreen'::enum_interview_stage_group_type_stage_type) AND (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid))
  • Rows Removed by Filter: 162
195. 16.328 16.328 ↑ 1.0 1 8,164

Index Scan using app_user_pkey on app_user app_user_itwug (cost=0.06..0.11 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=8,164)

  • Index Cond: (id = process_user_roles_itwug.user_id)
196. 16.328 16.328 ↑ 1.0 1 8,164

Index Scan using source_pkey on source source_mwrxm (cost=0.06..4.06 rows=1 width=44) (actual time=0.002..0.002 rows=1 loops=8,164)

  • Index Cond: (application_9.source_id = id)
197. 8.164 8.164 ↑ 1.0 1 8,164

Index Scan using source_type_pkey on source_type source_type_mwrxm (cost=0.03..0.04 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=8,164)

  • Index Cond: (source_mwrxm.source_type_id = id)
198. 922.532 922.532 ↓ 1,297.0 1,297 8,164

CTE Scan on relevant_applications (cost=0.00..0.01 rows=1 width=16) (actual time=0.000..0.113 rows=1,297 loops=8,164)

199. 20,289.912 28,911.504 ↓ 262.0 262 64,824

GroupAggregate (cost=6.30..6.31 rows=1 width=20) (actual time=0.003..0.446 rows=262 loops=64,824)

  • Group Key: relevant_applications_1.id
200. 8,505.411 8,621.592 ↓ 1,291.5 2,583 64,824

Sort (cost=6.30..6.31 rows=2 width=20) (actual time=0.002..0.133 rows=2,583 loops=64,824)

  • Sort Key: relevant_applications_1.id
  • Sort Method: quicksort Memory: 597kB
201. 3.260 116.181 ↓ 2,588.5 5,177 1

Nested Loop (cost=0.17..6.30 rows=2 width=20) (actual time=0.053..116.181 rows=5,177 loops=1)

202. 3.971 102.567 ↓ 2,588.5 5,177 1

Nested Loop (cost=0.14..6.24 rows=2 width=32) (actual time=0.036..102.567 rows=5,177 loops=1)

203. 3.125 79.351 ↓ 3,207.5 6,415 1

Nested Loop (cost=0.09..6.11 rows=2 width=32) (actual time=0.022..79.351 rows=6,415 loops=1)

204. 64.553 64.553 ↓ 1,297.0 1,297 1

CTE Scan on relevant_applications relevant_applications_1 (cost=0.00..0.01 rows=1 width=16) (actual time=0.001..64.553 rows=1,297 loops=1)

205. 11.673 11.673 ↓ 2.5 5 1,297

Index Scan using application_history_application_id_idx on application_history application_history_1 (cost=0.09..6.09 rows=2 width=32) (actual time=0.005..0.009 rows=5 loops=1,297)

  • Index Cond: (application_id = relevant_applications_1.id)
206. 19.245 19.245 ↑ 1.0 1 6,415

Index Scan using interview_stage_pkey on interview_stage (cost=0.06..0.06 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6,415)

  • Index Cond: (id = application_history_1.new_interview_stage_id)
  • Filter: (stage_type <> 'Archived'::enum_interview_stage_stage_type)
  • Rows Removed by Filter: 0
207. 10.354 10.354 ↑ 1.0 1 5,177

Index Scan using interview_stage_group_type_pkey on interview_stage_group_type interview_stage_group_type_2 (cost=0.03..0.03 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=5,177)

  • Index Cond: (id = interview_stage.interview_stage_group_id)
  • Filter: is_relevant_for_funnel
208. 129.648 129.648 ↑ 1.0 1 64,824

Index Scan using interview_stage_group_type_pkey on interview_stage_group_type interview_stage_group_type_1 (cost=0.03..1.70 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=64,824)

  • Index Cond: (id = interview_stage_group_type.id)
  • Filter: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
209. 1.063 32,724.246 ↓ 943.0 943 1

Sort (cost=0.01..0.01 rows=1 width=164) (actual time=32,724.198..32,724.246 rows=943 loops=1)

  • Sort Key: applications_with_stages.stage_order, applications_with_stages._tyeqg, applications_with_stages._tszat, applications_with_stages._tyeqg_value, applications_with_stages._tszat_value, applications_with_stages.interview_stage_id, applications_with_stages.title
  • Sort Method: quicksort Memory: 269kB
210. 32,723.183 32,723.183 ↓ 943.0 943 1

CTE Scan on applications_with_stages (cost=0.00..0.01 rows=1 width=164) (actual time=32,714.126..32,723.183 rows=943 loops=1)