explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cyUI

Settings
# exclusive inclusive rows x rows loops node
1. 0.274 35,108.348 ↓ 144.0 144 1

GroupAggregate (cost=93,295.71..93,295.72 rows=1 width=156) (actual time=35,108.030..35,108.348 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.220 407.493 ↓ 1,297.0 1,297 1

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

4. 3.393 400.249 ↓ 2,008.0 2,008 1

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

5. 1.470 388.866 ↓ 3,995.0 3,995 1

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

6. 0.562 369.124 ↓ 571.0 4,568 1

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

7. 6.160 368.562 ↓ 571.0 4,568 1

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

8. 2.701 362.402 ↓ 2.2 39,742 1

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

9. 0.555 19.478 ↓ 573.2 4,586 1

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

10. 3.035 18.923 ↓ 573.2 4,586 1

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

11. 1.809 2.130 ↓ 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.381..2.130 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.001 0.321 ↓ 0.0 0 1

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

13. 0.151 0.151 ↓ 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.151..0.151 rows=2,395 loops=1)

  • Index Cond: (user_id = 'd419fa47-df37-4c74-aa40-0f983629ab32'::uuid)
14. 0.121 0.121 ↑ 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.121..0.121 rows=1,798 loops=1)

  • Index Cond: (user_id = '44664ef6-dabe-4b95-95c8-41b130191b48'::uuid)
15. 0.014 0.014 ↑ 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.014..0.014 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.012 0.012 ↑ 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.012..0.012 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. 13.300 340.223 ↓ 2.0 35,156 1

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

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

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

22. 3.684 106.475 ↓ 2.0 34,973 1

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

23. 25.494 102.791 ↓ 2.0 34,973 1

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

24. 4.781 77.297 ↑ 1.0 70,168 1

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

25. 3.590 29.205 ↓ 2.0 35,012 1

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

26. 25.615 25.615 ↓ 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.017..25.615 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.948 43.311 ↑ 1.5 35,156 1

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

28. 16.167 40.363 ↑ 1.5 35,156 1

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

  • Group Key: application_3.id
29. 3.535 24.196 ↑ 1.5 35,156 1

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

30. 0.457 1.411 ↑ 2.2 110 1

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

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

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

32. 0.017 0.329 ↑ 2.2 110 1

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

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

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

  • Group Key: job_1.id
34. 0.008 0.259 ↑ 2.2 110 1

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

35. 0.071 0.088 ↑ 1.1 110 1

Bitmap Heap Scan on job job_1 (cost=2.24..106.27 rows=117 width=16) (actual time=0.025..0.088 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.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)
37. 0.000 0.047 ↓ 0.0 0 1

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

38. 0.000 0.047 ↓ 0.0 0 1

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

39. 0.047 0.047 ↓ 0.0 0 1

Seq Scan on user_job_security_roles (cost=0.00..7.60 rows=1 width=32) (actual time=0.046..0.047 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.001 0.013 ↓ 0.0 0 1

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

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

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

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

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

45. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on user_team_security_roles (cost=0.00..2.19 rows=1 width=32) (actual time=0.012..0.012 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.001 0.010 ↓ 0.0 0 1

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

53. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.03..6.29 rows=1 width=0) (actual time=0.009..0.009 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.000 0.093 ↓ 0.0 0 1

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

59. 0.004 0.093 ↓ 0.0 0 1

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

60. 0.000 0.089 ↓ 2.0 4 1

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

61. 0.002 0.046 ↓ 4.0 4 1

Subquery Scan on "*SELECT* 5" (cost=2.23..106.26 rows=1 width=20) (actual time=0.023..0.046 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.043 ↓ 0.0 0 1

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

65. 0.032 0.042 ↓ 0.0 0 1

Bitmap Heap Scan on job job_6 (cost=2.23..106.32 rows=1 width=16) (actual time=0.042..0.042 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.010 0.010 ↑ 1.0 114 1

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

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
67. 19.250 19.250 ↓ 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.007..0.175 rows=320 loops=110)

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

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

69. 3.042 218.282 ↑ 2.0 183 1

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

70. 2.153 215.240 ↑ 1.5 35,339 1

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

71. 0.070 100.591 ↑ 2.0 183 1

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

  • Group Key: application_4.id
72. 0.013 100.521 ↑ 2.0 183 1

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

73. 3.780 43.585 ↑ 2.0 2 1

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

  • Merge Cond: (employee.candidate_id = application_4.candidate_id)
74. 0.055 0.055 ↑ 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.023..0.055 rows=36 loops=1)

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

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

  • Sort Key: application_4.candidate_id
  • Sort Method: quicksort Memory: 4,286kB
76. 20.643 20.643 ↓ 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.017..20.643 rows=35,195 loops=1)

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

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

78. 3.333 56.906 ↑ 2.0 181 1

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

79. 2.311 53.573 ↓ 1.0 35,376 1

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

80. 0.025 20.439 ↑ 2.0 183 1

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

81. 20.414 20.414 ↑ 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.063..20.414 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.029 30.823 ↓ 1.0 35,193 1

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

83. 8.069 27.794 ↓ 1.0 35,193 1

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

  • Hash Cond: (application_6.candidate_id = employee_1.candidate_id)
84. 16.872 16.872 ↓ 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.012..16.872 rows=35,195 loops=1)

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

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

  • Buckets: 16,384 Batches: 1 Memory Usage: 130kB
86. 2.210 2.210 ↑ 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.210 rows=13,616 loops=1)

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

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

88. 16.727 109.040 ↑ 1.5 35,156 1

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

89. 4.376 92.313 ↑ 1.5 70,312 1

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

90. 2.995 44.122 ↑ 1.5 35,156 1

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

91. 16.253 41.127 ↑ 1.5 35,156 1

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

  • Group Key: application_7.id
92. 3.798 24.874 ↑ 1.5 35,156 1

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

93. 0.451 1.386 ↑ 2.2 110 1

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

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

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

95. 0.017 0.334 ↑ 2.2 110 1

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

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

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

  • Group Key: job_8.id
97. 0.012 0.265 ↑ 2.2 110 1

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

98. 0.071 0.091 ↑ 1.1 110 1

Bitmap Heap Scan on job job_8 (cost=2.24..106.27 rows=117 width=16) (actual time=0.029..0.091 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.020 0.020 ↑ 1.0 114 1

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

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

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

101. 0.000 0.047 ↓ 0.0 0 1

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

102. 0.047 0.047 ↓ 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.047..0.047 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.000 0.013 ↓ 0.0 0 1

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

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

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

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

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

108. 0.012 0.012 ↓ 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.012..0.012 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.000 0.009 ↓ 0.0 0 1

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

116. 0.000 0.009 ↓ 0.0 0 1

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

117. 0.009 0.009 ↓ 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.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
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.000 0.093 ↓ 0.0 0 1

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

122. 0.003 0.093 ↓ 0.0 0 1

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

123. 0.001 0.090 ↓ 2.0 4 1

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

124. 0.002 0.046 ↓ 4.0 4 1

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

125. 0.033 0.044 ↓ 4.0 4 1

Bitmap Heap Scan on job job_12 (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
126. 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)
127. 0.000 0.043 ↓ 0.0 0 1

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

128. 0.033 0.043 ↓ 0.0 0 1

Bitmap Heap Scan on job job_13 (cost=2.23..106.32 rows=1 width=16) (actual time=0.043..0.043 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.010 0.010 ↑ 1.0 114 1

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

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
130. 19.690 19.690 ↓ 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.007..0.179 rows=320 loops=110)

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

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

132. 15.627 40.865 ↑ 1.5 35,156 1

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

  • Group Key: application_8.id
133. 3.594 25.238 ↑ 1.5 35,156 1

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

134. 0.457 1.404 ↑ 2.2 110 1

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

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

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

136. 0.021 0.347 ↑ 2.2 110 1

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

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

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

  • Group Key: job_15.id
138. 0.009 0.276 ↑ 2.2 110 1

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

139. 0.065 0.083 ↑ 1.1 110 1

Bitmap Heap Scan on job job_15 (cost=2.24..106.27 rows=117 width=16) (actual time=0.027..0.083 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.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)
141. 0.000 0.050 ↓ 0.0 0 1

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

142. 0.001 0.050 ↓ 0.0 0 1

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

143. 0.049 0.049 ↓ 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.049..0.049 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.013 ↓ 0.0 0 1

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

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

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

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

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

149. 0.012 0.012 ↓ 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.012..0.012 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.009 ↓ 0.0 0 1

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

157. 0.000 0.009 ↓ 0.0 0 1

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

158. 0.009 0.009 ↓ 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.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
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.112 ↓ 0.0 0 1

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

163. 0.003 0.111 ↓ 0.0 0 1

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

164. 0.001 0.108 ↓ 2.0 4 1

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

165. 0.002 0.053 ↓ 4.0 4 1

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

166. 0.033 0.051 ↓ 4.0 4 1

Bitmap Heap Scan on job job_19 (cost=2.23..106.26 rows=1 width=16) (actual time=0.029..0.051 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.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)
168. 0.001 0.054 ↓ 0.0 0 1

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

169. 0.033 0.053 ↓ 0.0 0 1

Bitmap Heap Scan on job job_20 (cost=2.23..106.32 rows=1 width=16) (actual time=0.053..0.053 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.020 0.020 ↑ 1.0 114 1

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

  • Index Cond: (organization_id = '399dff6f-ad8f-4e70-b082-b547b26c8fe4'::uuid)
171. 20.240 20.240 ↓ 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.006..0.184 rows=320 loops=110)

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

Index Scan using application_pkey on application (cost=0.08..4.09 rows=1 width=804) (actual time=0.004..0.004 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. 7.990 7.990 ↑ 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.002..0.002 rows=1 loops=3,995)

  • Index Cond: (application_id = application.id)
174. 6.024 6.024 ↑ 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.003..0.003 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.529 35,106.541 ↓ 943.0 943 1

Unique (cost=22.76..22.76 rows=1 width=177) (actual time=35,097.587..35,106.541 rows=943 loops=1)

177. 64.466 35,101.012 ↓ 64,824.0 64,824 1

Sort (cost=22.76..22.76 rows=1 width=177) (actual time=35,097.585..35,101.012 rows=64,824 loops=1)

  • Sort Key: application_9.id, interview_stage_group_type.id
  • Sort Method: quicksort Memory: 18,669kB
178. 95.826 35,036.546 ↓ 64,824.0 64,824 1

Nested Loop (cost=6.73..22.76 rows=1 width=177) (actual time=441.749..35,036.546 rows=64,824 loops=1)

179. 1,118.001 34,811.072 ↓ 64,824.0 64,824 1

Nested Loop (cost=6.70..20.72 rows=1 width=135) (actual time=441.730..34,811.072 rows=64,824 loops=1)

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

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

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

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

182. 7.674 615.921 ↓ 8,164.0 8,164 1

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

183. 3.667 591.919 ↓ 8,164.0 8,164 1

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

184. 11.212 563.760 ↓ 8,164.0 8,164 1

Nested Loop (cost=0.26..10.19 rows=1 width=113) (actual time=368.032..563.760 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. 1.545 447.788 ↓ 3,880.0 3,880 1

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

186. 5.929 438.483 ↓ 3,880.0 3,880 1

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

187. 1.918 413.309 ↓ 6,415.0 6,415 1

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

188. 3.164 385.731 ↓ 3,207.5 6,415 1

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

189. 368.300 368.300 ↓ 1,297.0 1,297 1

CTE Scan on relevant_applications application_9 (cost=0.00..0.01 rows=1 width=32) (actual time=367.942..368.300 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.006..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. 7.760 7.760 ↑ 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.002..0.002 rows=1 loops=3,880)

  • Index Cond: (id = current_stage_app_history.interview_stage_group_id)
  • Filter: is_relevant_for_funnel
194. 104.760 104.760 ↑ 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.027 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. 24.492 24.492 ↑ 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.003..0.003 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. 963.352 963.352 ↓ 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.118 rows=1,297 loops=8,164)

199. 22,169.808 31,245.168 ↓ 262.0 262 64,824

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

  • Group Key: relevant_applications_1.id
200. 9,004.635 9,075.360 ↓ 1,291.5 2,583 64,824

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

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

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

202. 0.202 63.109 ↓ 2,588.5 5,177 1

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

203. 1.413 50.077 ↓ 3,207.5 6,415 1

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

204. 40.882 40.882 ↓ 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.000..40.882 rows=1,297 loops=1)

205. 7.782 7.782 ↓ 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.003..0.006 rows=5 loops=1,297)

  • Index Cond: (application_id = relevant_applications_1.id)
206. 12.830 12.830 ↑ 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.002..0.002 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. 5.177 5.177 ↑ 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.001..0.001 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.109 35,108.074 ↓ 943.0 943 1

Sort (cost=0.01..0.01 rows=1 width=164) (actual time=35,108.023..35,108.074 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. 35,106.965 35,106.965 ↓ 943.0 943 1

CTE Scan on applications_with_stages (cost=0.00..0.01 rows=1 width=164) (actual time=35,097.590..35,106.965 rows=943 loops=1)