explain.depesz.com

PostgreSQL's explain analyze made readable

Result: amX

Settings
# exclusive inclusive rows x rows loops node
1. 0.501 95.018 ↓ 22.7 613 1

Sort (cost=103,384.09..103,384.11 rows=27 width=804) (actual time=94.983..95.018 rows=613 loops=1)

  • Sort Key: application.id
  • Sort Method: quicksort Memory: 187kB
2. 0.243 94.517 ↓ 22.7 613 1

Nested Loop (cost=20,070.48..103,383.96 rows=27 width=804) (actual time=91.665..94.517 rows=613 loops=1)

3. 0.078 91.822 ↑ 2.5 613 1

Subquery Scan on filtered_application_ids (cost=20,070.40..97,485.38 rows=1,562 width=16) (actual time=91.635..91.822 rows=613 loops=1)

4. 1.104 91.744 ↑ 2.5 613 1

HashSetOp Intersect (cost=20,070.40..97,480.70 rows=1,562 width=20) (actual time=91.634..91.744 rows=613 loops=1)

5. 0.283 90.640 ↑ 2.7 3,697 1

Append (cost=20,070.40..97,475.71 rows=9,978 width=20) (actual time=25.399..90.640 rows=3,697 loops=1)

6. 1.113 25.785 ↓ 1.3 2,097 1

HashAggregate (cost=20,070.40..20,075.09 rows=1,562 width=20) (actual time=25.399..25.785 rows=2,097 loops=1)

  • Group Key: application_1.id
7. 0.151 24.672 ↓ 1.3 2,097 1

Append (cost=0.08..20,069.62 rows=1,562 width=16) (actual time=17.490..24.672 rows=2,097 loops=1)

8. 0.208 1.795 ↓ 0.0 0 1

Nested Loop (cost=0.08..1,163.70 rows=5 width=16) (actual time=1.794..1.795 rows=0 loops=1)

9. 0.471 0.471 ↓ 1.0 279 1

Seq Scan on application_subprocesses (cost=0.00..42.68 rows=278 width=16) (actual time=0.007..0.471 rows=279 loops=1)

  • Filter: (process_type = 'application_review'::text)
  • Rows Removed by Filter: 1,923
10. 1.116 1.116 ↓ 0.0 0 279

Index Scan using application_pkey on application application_1 (cost=0.08..4.03 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=279)

  • Index Cond: (id = application_subprocesses.application_id)
  • Filter: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Rows Removed by Filter: 1
11. 3.588 22.726 ↓ 1.3 2,097 1

Hash Join (cost=1,571.58..18,898.89 rows=1,557 width=16) (actual time=15.695..22.726 rows=2,097 loops=1)

  • Hash Cond: (application_2.current_interview_stage_id = interview_stage.id)
12. 3.573 4.492 ↑ 1.0 16,275 1

Bitmap Heap Scan on application application_2 (cost=321.68..17,640.32 rows=16,513 width=32) (actual time=0.989..4.492 rows=16,275 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=635
13. 0.919 0.919 ↑ 1.0 16,421 1

Bitmap Index Scan on application_organization_id_idx (cost=0.00..320.85 rows=16,513 width=0) (actual time=0.919..0.919 rows=16,421 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
14. 1.293 14.646 ↓ 1.0 4,972 1

Hash (cost=1,232.85..1,232.85 rows=4,872 width=16) (actual time=14.645..14.646 rows=4,972 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 298kB
15. 13.353 13.353 ↓ 1.0 4,972 1

Seq Scan on interview_stage (cost=0.00..1,232.85 rows=4,872 width=16) (actual time=0.008..13.353 rows=4,972 loops=1)

  • Filter: (stage_type = 'PreInterviewScreen'::enum_interview_stage_stage_type)
  • Rows Removed by Filter: 46,925
16. 0.725 64.572 ↑ 5.3 1,600 1

HashAggregate (cost=77,360.41..77,385.66 rows=8,416 width=20) (actual time=64.278..64.572 rows=1,600 loops=1)

  • Group Key: ""*SELECT* 2"".id
17. 0.110 63.847 ↑ 5.3 1,600 1

Append (cost=321.27..77,356.20 rows=8,416 width=16) (actual time=17.827..63.847 rows=1,600 loops=1)

18. 0.162 18.456 ↑ 5.2 1,599 1

Result (cost=321.27..19,637.97 rows=8,257 width=16) (actual time=17.826..18.456 rows=1,599 loops=1)

19. 6.367 18.294 ↑ 5.2 1,599 1

HashSetOp Intersect (cost=321.27..19,613.20 rows=8,257 width=20) (actual time=17.825..18.294 rows=1,599 loops=1)

20. 1.271 11.927 ↑ 1.5 17,702 1

Append (cost=321.27..19,600.27 rows=25,846 width=20) (actual time=1.061..11.927 rows=17,702 loops=1)

21. 1.672 7.449 ↓ 2.0 16,102 1

Subquery Scan on "*SELECT* 2" (cost=321.27..17,672.94 rows=8,257 width=20) (actual time=1.061..7.449 rows=16,102 loops=1)

22. 4.809 5.777 ↓ 2.0 16,102 1

Bitmap Heap Scan on application application_3 (cost=321.27..17,648.16 rows=8,257 width=16) (actual time=1.060..5.777 rows=16,102 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: COALESCE((status <> 'hired'::enum_application_status), true)
  • Rows Removed by Filter: 173
  • Heap Blocks: exact=635
23. 0.968 0.968 ↑ 1.0 16,421 1

Bitmap Index Scan on application_organization_id_idx (cost=0.00..320.85 rows=16,513 width=0) (actual time=0.968..0.968 rows=16,421 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
24. 0.155 3.207 ↑ 11.0 1,600 1

Subquery Scan on "*SELECT* 1" (cost=1,783.04..1,888.57 rows=17,589 width=20) (actual time=2.696..3.207 rows=1,600 loops=1)

25. 0.909 3.052 ↑ 11.0 1,600 1

HashAggregate (cost=1,783.04..1,835.80 rows=17,589 width=16) (actual time=2.695..3.052 rows=1,600 loops=1)

  • Group Key: application_4.id
26. 0.217 2.143 ↑ 11.0 1,600 1

Nested Loop (cost=634.04..1,774.24 rows=17,589 width=16) (actual time=0.859..2.143 rows=1,600 loops=1)

27. 0.012 0.897 ↑ 8.9 7 1

Nested Loop (cost=633.95..780.05 rows=62 width=32) (actual time=0.849..0.897 rows=7 loops=1)

28. 0.011 0.843 ↑ 8.9 7 1

HashAggregate (cost=633.90..634.08 rows=62 width=16) (actual time=0.839..0.843 rows=7 loops=1)

  • Group Key: job_1.id
29. 0.002 0.832 ↑ 8.9 7 1

Append (cost=0.11..633.87 rows=62 width=16) (actual time=0.224..0.832 rows=7 loops=1)

30. 0.000 0.086 ↓ 0.0 0 1

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

31. 0.001 0.086 ↓ 0.0 0 1

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

32. 0.085 0.085 ↓ 0.0 0 1

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

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 660
33. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (id = user_job_security_roles.job_id)
  • Filter: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
35. 0.128 0.664 ↓ 7.0 7 1

Nested Loop (cost=2.20..341.40 rows=1 width=16) (actual time=0.136..0.664 rows=7 loops=1)

  • Join Filter: (user_team_security_roles.role_id = security_role_1.id)
  • Rows Removed by Join Filter: 2,037
36. 0.042 0.249 ↓ 7.0 7 1

Nested Loop (cost=2.20..334.53 rows=1 width=32) (actual time=0.071..0.249 rows=7 loops=1)

  • Join Filter: (team.path @> (SubPlan 1))
  • Rows Removed by Join Filter: 52
37. 0.004 0.039 ↑ 1.0 1 1

Nested Loop (cost=0.06..7.80 rows=1 width=85) (actual time=0.038..0.039 rows=1 loops=1)

38. 0.027 0.027 ↑ 1.0 1 1

Seq Scan on user_team_security_roles (cost=0.00..3.72 rows=1 width=32) (actual time=0.026..0.027 rows=1 loops=1)

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 159
39. 0.008 0.008 ↑ 1.0 1 1

Index Scan using team_pkey on team (cost=0.06..4.06 rows=1 width=85) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = user_team_security_roles.team_id)
40. 0.041 0.050 ↑ 1.0 59 1

Bitmap Heap Scan on job job_2 (cost=2.15..87.01 rows=59 width=32) (actual time=0.014..0.050 rows=59 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=11
41. 0.009 0.009 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.009..0.009 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
42.          

SubPlan (for Nested Loop)

43. 0.118 0.118 ↑ 1.0 1 59

Index Scan using team_pkey on team team_3 (cost=0.06..4.06 rows=1 width=69) (actual time=0.002..0.002 rows=1 loops=59)

  • Index Cond: (id = job_2.team_id)
44. 0.287 0.287 ↓ 1.0 292 7

Seq Scan on security_role security_role_1 (cost=0.00..5.86 rows=288 width=16) (actual time=0.003..0.041 rows=292 loops=7)

  • Filter: can_see_candidates
45. 0.001 0.030 ↓ 0.0 0 1

Nested Loop (cost=2.20..95.00 rows=59 width=16) (actual time=0.030..0.030 rows=0 loops=1)

46. 0.000 0.029 ↓ 0.0 0 1

Nested Loop (cost=0.05..7.81 rows=1 width=0) (actual time=0.029..0.029 rows=0 loops=1)

47. 0.029 0.029 ↓ 0.0 0 1

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

  • Filter: ((team_id IS NULL) AND (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid))
  • Rows Removed by Filter: 160
48. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Heap Scan on job job_3 (cost=2.15..87.01 rows=59 width=16) (never executed)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
50. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
51. 0.001 0.050 ↓ 0.0 0 1

Result (cost=2.15..174.06 rows=1 width=16) (actual time=0.050..0.050 rows=0 loops=1)

52. 0.001 0.049 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.15..174.06 rows=1 width=20) (actual time=0.049..0.049 rows=0 loops=1)

53. 0.000 0.048 ↓ 0.0 0 1

Append (cost=2.15..174.06 rows=2 width=20) (actual time=0.048..0.048 rows=0 loops=1)

54. 0.001 0.026 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 4_1" (cost=2.15..87.01 rows=1 width=20) (actual time=0.026..0.026 rows=0 loops=1)

55. 0.017 0.025 ↓ 0.0 0 1

Bitmap Heap Scan on job job_4 (cost=2.15..87.01 rows=1 width=16) (actual time=0.025..0.025 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
56. 0.008 0.008 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.008..0.008 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
57. 0.001 0.022 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 5" (cost=2.15..87.04 rows=1 width=20) (actual time=0.022..0.022 rows=0 loops=1)

58. 0.015 0.021 ↓ 0.0 0 1

Bitmap Heap Scan on job job_5 (cost=2.15..87.04 rows=1 width=16) (actual time=0.021..0.021 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: (author_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
59. 0.006 0.006 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.006..0.006 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
60. 0.042 0.042 ↑ 1.0 1 7

Index Only Scan using job_pkey on job (cost=0.06..2.35 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=7)

  • Index Cond: (id = job_1.id)
  • Heap Fetches: 7
61. 1.029 1.029 ↑ 1.2 229 7

Index Scan using application_job_id_idx on application application_4 (cost=0.08..15.18 rows=284 width=32) (actual time=0.009..0.147 rows=229 loops=7)

  • Index Cond: (job_id = job.id)
62. 0.000 45.281 ↑ 159.0 1 1

Result (cost=53,769.47..57,705.61 rows=159 width=16) (actual time=45.280..45.281 rows=1 loops=1)

63. 0.206 45.281 ↑ 159.0 1 1

HashSetOp Intersect (cost=53,769.47..57,705.13 rows=159 width=20) (actual time=45.279..45.281 rows=1 loops=1)

64. 0.112 45.075 ↑ 10.0 1,773 1

Append (cost=53,769.47..57,696.26 rows=17,748 width=20) (actual time=37.317..45.075 rows=1,773 loops=1)

65. 0.064 37.341 ↓ 1.1 173 1

HashAggregate (cost=53,769.47..53,769.95 rows=159 width=20) (actual time=37.316..37.341 rows=173 loops=1)

  • Group Key: application_5.id
66. 0.011 37.277 ↓ 1.1 173 1

Append (cost=17,872.82..53,769.40 rows=159 width=16) (actual time=37.241..37.277 rows=173 loops=1)

67. 1.691 14.907 ↓ 0.0 0 1

Merge Join (cost=17,872.82..17,891.12 rows=3 width=16) (actual time=14.907..14.907 rows=0 loops=1)

  • Merge Cond: (employee.candidate_id = application_5.candidate_id)
68. 0.082 0.082 ↑ 329.4 61 1

Index Scan using employee_candidate_id_idx on employee (cost=0.06..870.50 rows=20,093 width=16) (actual time=0.013..0.082 rows=61 loops=1)

  • Filter: ((NOT is_alumni) AND (user_id IS DISTINCT FROM '773395c7-b316-4663-a6e9-0305c681d81e'::uuid))
  • Rows Removed by Filter: 3
69. 8.190 13.134 ↑ 1.0 15,809 1

Sort (cost=17,871.69..17,879.95 rows=16,513 width=32) (actual time=12.126..13.134 rows=15,809 loops=1)

  • Sort Key: application_5.candidate_id
  • Sort Method: quicksort Memory: 1,656kB
70. 3.833 4.944 ↑ 1.0 16,275 1

Bitmap Heap Scan on application application_5 (cost=321.68..17,640.32 rows=16,513 width=32) (actual time=1.184..4.944 rows=16,275 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=635
71. 1.111 1.111 ↑ 1.0 16,421 1

Bitmap Index Scan on application_organization_id_idx (cost=0.00..320.85 rows=16,513 width=0) (actual time=1.111..1.111 rows=16,421 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
72. 0.016 22.359 ↓ 1.1 173 1

Result (cost=320.86..35,878.03 rows=156 width=16) (actual time=22.333..22.359 rows=173 loops=1)

73. 1.984 22.343 ↓ 1.1 173 1

HashSetOp Intersect (cost=320.86..35,877.56 rows=156 width=20) (actual time=22.332..22.343 rows=173 loops=1)

74. 1.161 20.359 ↑ 1.0 16,448 1

Append (cost=320.86..35,869.23 rows=16,666 width=20) (actual time=0.988..20.359 rows=16,448 loops=1)

75. 0.027 4.743 ↓ 1.1 173 1

Subquery Scan on "*SELECT* 7" (cost=320.86..17,648.23 rows=156 width=20) (actual time=0.987..4.743 rows=173 loops=1)

76. 3.984 4.716 ↓ 1.1 173 1

Bitmap Heap Scan on application application_6 (cost=320.86..17,647.76 rows=156 width=16) (actual time=0.986..4.716 rows=173 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: (status = 'hired'::enum_application_status)
  • Rows Removed by Filter: 16,102
  • Heap Blocks: exact=635
77. 0.732 0.732 ↑ 1.0 16,421 1

Bitmap Index Scan on application_organization_id_idx (cost=0.00..320.85 rows=16,513 width=0) (actual time=0.732..0.732 rows=16,421 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
78. 1.679 14.455 ↑ 1.0 16,275 1

Subquery Scan on "*SELECT* 6" (cost=769.40..18,196.00 rows=16,510 width=20) (actual time=6.607..14.455 rows=16,275 loops=1)

79. 3.890 12.776 ↑ 1.0 16,275 1

Hash Anti Join (cost=769.40..18,146.47 rows=16,510 width=16) (actual time=6.606..12.776 rows=16,275 loops=1)

  • Hash Cond: (application_7.candidate_id = employee_1.candidate_id)
80. 2.543 3.539 ↑ 1.0 16,275 1

Bitmap Heap Scan on application application_7 (cost=321.68..17,640.32 rows=16,513 width=32) (actual time=1.076..3.539 rows=16,275 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=635
81. 0.996 0.996 ↑ 1.0 16,421 1

Bitmap Index Scan on application_organization_id_idx (cost=0.00..320.85 rows=16,513 width=0) (actual time=0.996..0.996 rows=16,421 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
82. 1.160 5.347 ↑ 334.9 60 1

Hash (cost=377.39..377.39 rows=20,094 width=16) (actual time=5.347..5.347 rows=60 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 259kB
83. 4.187 4.187 ↓ 1.0 20,107 1

Seq Scan on employee employee_1 (cost=0.00..377.39 rows=20,094 width=16) (actual time=0.009..4.187 rows=20,107 loops=1)

  • Filter: (NOT is_alumni)
  • Rows Removed by Filter: 36
84. 0.144 7.622 ↑ 11.0 1,600 1

Result (cost=1,783.04..3,899.68 rows=17,589 width=20) (actual time=7.296..7.622 rows=1,600 loops=1)

85. 0.965 7.478 ↑ 11.0 1,600 1

HashSetOp Intersect (cost=1,783.04..3,846.92 rows=17,589 width=20) (actual time=7.295..7.478 rows=1,600 loops=1)

86. 0.218 6.513 ↑ 11.0 3,200 1

Append (cost=1,783.04..3,829.33 rows=35,178 width=20) (actual time=2.893..6.513 rows=3,200 loops=1)

87. 0.155 3.402 ↑ 11.0 1,600 1

Subquery Scan on "*SELECT* 3" (cost=1,783.04..1,888.57 rows=17,589 width=20) (actual time=2.893..3.402 rows=1,600 loops=1)

88. 1.009 3.247 ↑ 11.0 1,600 1

HashAggregate (cost=1,783.04..1,835.80 rows=17,589 width=16) (actual time=2.892..3.247 rows=1,600 loops=1)

  • Group Key: application_8.id
89. 0.212 2.238 ↑ 11.0 1,600 1

Nested Loop (cost=634.04..1,774.24 rows=17,589 width=16) (actual time=0.988..2.238 rows=1,600 loops=1)

90. 0.011 1.025 ↑ 8.9 7 1

Nested Loop (cost=633.95..780.05 rows=62 width=32) (actual time=0.978..1.025 rows=7 loops=1)

91. 0.012 0.972 ↑ 8.9 7 1

HashAggregate (cost=633.90..634.08 rows=62 width=16) (actual time=0.968..0.972 rows=7 loops=1)

  • Group Key: job_7.id
92. 0.003 0.960 ↑ 8.9 7 1

Append (cost=0.11..633.87 rows=62 width=16) (actual time=0.283..0.960 rows=7 loops=1)

93. 0.000 0.085 ↓ 0.0 0 1

Nested Loop (cost=0.11..23.13 rows=1 width=16) (actual time=0.085..0.085 rows=0 loops=1)

94. 0.001 0.085 ↓ 0.0 0 1

Nested Loop (cost=0.05..18.94 rows=1 width=16) (actual time=0.085..0.085 rows=0 loops=1)

95. 0.084 0.084 ↓ 0.0 0 1

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

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 660
96. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (id = user_job_security_roles_1.job_id)
  • Filter: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
98. 0.163 0.802 ↓ 7.0 7 1

Nested Loop (cost=2.20..341.40 rows=1 width=16) (actual time=0.197..0.802 rows=7 loops=1)

  • Join Filter: (user_team_security_roles_2.role_id = security_role_4.id)
  • Rows Removed by Join Filter: 2,037
99. 0.043 0.254 ↓ 7.0 7 1

Nested Loop (cost=2.20..334.53 rows=1 width=32) (actual time=0.083..0.254 rows=7 loops=1)

  • Join Filter: (team_1.path @> (SubPlan 2))
  • Rows Removed by Join Filter: 52
100. 0.004 0.038 ↑ 1.0 1 1

Nested Loop (cost=0.06..7.80 rows=1 width=85) (actual time=0.038..0.038 rows=1 loops=1)

101. 0.023 0.023 ↑ 1.0 1 1

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

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 159
102. 0.011 0.011 ↑ 1.0 1 1

Index Scan using team_pkey on team team_1 (cost=0.06..4.06 rows=1 width=85) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: (id = user_team_security_roles_2.team_id)
103. 0.042 0.055 ↑ 1.0 59 1

Bitmap Heap Scan on job job_8 (cost=2.15..87.01 rows=59 width=32) (actual time=0.019..0.055 rows=59 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=11
104. 0.013 0.013 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.013..0.013 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
105.          

SubPlan (for Nested Loop)

106. 0.118 0.118 ↑ 1.0 1 59

Index Scan using team_pkey on team team_4 (cost=0.06..4.06 rows=1 width=69) (actual time=0.002..0.002 rows=1 loops=59)

  • Index Cond: (id = job_8.team_id)
107. 0.385 0.385 ↓ 1.0 292 7

Seq Scan on security_role security_role_4 (cost=0.00..5.86 rows=288 width=16) (actual time=0.007..0.055 rows=292 loops=7)

  • Filter: can_see_candidates
108. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=2.20..95.00 rows=59 width=16) (actual time=0.018..0.018 rows=0 loops=1)

109. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=0.05..7.81 rows=1 width=0) (actual time=0.018..0.018 rows=0 loops=1)

110. 0.018 0.018 ↓ 0.0 0 1

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

  • Filter: ((team_id IS NULL) AND (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid))
  • Rows Removed by Filter: 160
111. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Heap Scan on job job_9 (cost=2.15..87.01 rows=59 width=16) (never executed)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
113. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
114. 0.000 0.052 ↓ 0.0 0 1

Result (cost=2.15..174.06 rows=1 width=16) (actual time=0.052..0.052 rows=0 loops=1)

115. 0.001 0.052 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.15..174.06 rows=1 width=20) (actual time=0.052..0.052 rows=0 loops=1)

116. 0.000 0.051 ↓ 0.0 0 1

Append (cost=2.15..174.06 rows=2 width=20) (actual time=0.051..0.051 rows=0 loops=1)

117. 0.001 0.027 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 4_2" (cost=2.15..87.01 rows=1 width=20) (actual time=0.027..0.027 rows=0 loops=1)

118. 0.018 0.026 ↓ 0.0 0 1

Bitmap Heap Scan on job job_10 (cost=2.15..87.01 rows=1 width=16) (actual time=0.026..0.026 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
119. 0.008 0.008 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.008..0.008 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
120. 0.001 0.024 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 5_1" (cost=2.15..87.04 rows=1 width=20) (actual time=0.024..0.024 rows=0 loops=1)

121. 0.016 0.023 ↓ 0.0 0 1

Bitmap Heap Scan on job job_11 (cost=2.15..87.04 rows=1 width=16) (actual time=0.023..0.023 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: (author_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
122. 0.007 0.007 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.007..0.007 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
123. 0.042 0.042 ↑ 1.0 1 7

Index Only Scan using job_pkey on job job_6 (cost=0.06..2.35 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=7)

  • Index Cond: (id = job_7.id)
  • Heap Fetches: 7
124. 1.001 1.001 ↑ 1.2 229 7

Index Scan using application_job_id_idx on application application_8 (cost=0.08..15.18 rows=284 width=32) (actual time=0.008..0.143 rows=229 loops=7)

  • Index Cond: (job_id = job_6.id)
125. 0.143 2.893 ↑ 11.0 1,600 1

Subquery Scan on "*SELECT* 4" (cost=1,782.46..1,887.99 rows=17,589 width=20) (actual time=2.449..2.893 rows=1,600 loops=1)

126. 0.876 2.750 ↑ 11.0 1,600 1

HashAggregate (cost=1,782.46..1,835.22 rows=17,589 width=16) (actual time=2.447..2.750 rows=1,600 loops=1)

  • Group Key: application_9.id
127. 0.200 1.874 ↑ 11.0 1,600 1

Nested Loop (cost=633.46..1,773.66 rows=17,589 width=16) (actual time=0.747..1.874 rows=1,600 loops=1)

128. 0.007 0.771 ↑ 8.9 7 1

Nested Loop (cost=633.38..779.47 rows=62 width=32) (actual time=0.734..0.771 rows=7 loops=1)

129. 0.010 0.722 ↑ 8.9 7 1

HashAggregate (cost=633.32..633.50 rows=62 width=16) (actual time=0.717..0.722 rows=7 loops=1)

  • Group Key: job_13.id
130. 0.004 0.712 ↑ 8.9 7 1

Append (cost=0.11..633.29 rows=62 width=16) (actual time=0.197..0.712 rows=7 loops=1)

131. 0.000 0.072 ↓ 0.0 0 1

Nested Loop (cost=0.11..23.20 rows=1 width=16) (actual time=0.072..0.072 rows=0 loops=1)

132. 0.000 0.072 ↓ 0.0 0 1

Nested Loop (cost=0.05..19.00 rows=1 width=16) (actual time=0.072..0.072 rows=0 loops=1)

133. 0.072 0.072 ↓ 0.0 0 1

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

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 660
134. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (id = user_job_security_roles_2.job_id)
  • Filter: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
136. 0.049 0.554 ↓ 7.0 7 1

Nested Loop (cost=2.20..340.69 rows=1 width=16) (actual time=0.123..0.554 rows=7 loops=1)

  • Join Filter: (user_team_security_roles_4.role_id = security_role_7.id)
  • Rows Removed by Join Filter: 602
137. 0.046 0.246 ↓ 7.0 7 1

Nested Loop (cost=2.20..334.53 rows=1 width=32) (actual time=0.079..0.246 rows=7 loops=1)

  • Join Filter: (team_2.path @> (SubPlan 3))
  • Rows Removed by Join Filter: 52
138. 0.003 0.038 ↑ 1.0 1 1

Nested Loop (cost=0.06..7.80 rows=1 width=85) (actual time=0.037..0.038 rows=1 loops=1)

139. 0.029 0.029 ↑ 1.0 1 1

Seq Scan on user_team_security_roles user_team_security_roles_4 (cost=0.00..3.72 rows=1 width=32) (actual time=0.029..0.029 rows=1 loops=1)

  • Filter: (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 159
140. 0.006 0.006 ↑ 1.0 1 1

Index Scan using team_pkey on team team_2 (cost=0.06..4.06 rows=1 width=85) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = user_team_security_roles_4.team_id)
141. 0.028 0.044 ↑ 1.0 59 1

Bitmap Heap Scan on job job_14 (cost=2.15..87.01 rows=59 width=32) (actual time=0.021..0.044 rows=59 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Heap Blocks: exact=11
142. 0.016 0.016 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.016..0.016 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
143.          

SubPlan (for Nested Loop)

144. 0.118 0.118 ↑ 1.0 1 59

Index Scan using team_pkey on team team_5 (cost=0.06..4.06 rows=1 width=69) (actual time=0.002..0.002 rows=1 loops=59)

  • Index Cond: (id = job_14.team_id)
145. 0.259 0.259 ↓ 1.0 87 7

Seq Scan on security_role security_role_7 (cost=0.00..5.86 rows=85 width=16) (actual time=0.003..0.037 rows=87 loops=7)

  • Filter: can_see_and_edit_hired_candidates
  • Rows Removed by Filter: 205
146. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=2.20..95.07 rows=59 width=16) (actual time=0.017..0.017 rows=0 loops=1)

147. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.05..7.88 rows=1 width=0) (actual time=0.017..0.017 rows=0 loops=1)

148. 0.017 0.017 ↓ 0.0 0 1

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

  • Filter: ((team_id IS NULL) AND (user_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid))
  • Rows Removed by Filter: 160
149. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Heap Scan on job job_15 (cost=2.15..87.01 rows=59 width=16) (never executed)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
151. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
152. 0.001 0.065 ↓ 0.0 0 1

Result (cost=2.15..174.06 rows=1 width=16) (actual time=0.065..0.065 rows=0 loops=1)

153. 0.000 0.064 ↓ 0.0 0 1

HashSetOp Intersect (cost=2.15..174.06 rows=1 width=20) (actual time=0.064..0.064 rows=0 loops=1)

154. 0.001 0.064 ↓ 0.0 0 1

Append (cost=2.15..174.06 rows=2 width=20) (actual time=0.064..0.064 rows=0 loops=1)

155. 0.001 0.033 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 4_3" (cost=2.15..87.01 rows=1 width=20) (actual time=0.033..0.033 rows=0 loops=1)

156. 0.018 0.032 ↓ 0.0 0 1

Bitmap Heap Scan on job job_16 (cost=2.15..87.01 rows=1 width=16) (actual time=0.032..0.032 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: confidential
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
157. 0.014 0.014 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.014..0.014 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
158. 0.000 0.030 ↓ 0.0 0 1

Subquery Scan on "*SELECT* 5_2" (cost=2.15..87.04 rows=1 width=20) (actual time=0.030..0.030 rows=0 loops=1)

159. 0.017 0.030 ↓ 0.0 0 1

Bitmap Heap Scan on job job_17 (cost=2.15..87.04 rows=1 width=16) (actual time=0.030..0.030 rows=0 loops=1)

  • Recheck Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
  • Filter: (author_id = '773395c7-b316-4663-a6e9-0305c681d81e'::uuid)
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=11
160. 0.013 0.013 ↓ 1.1 67 1

Bitmap Index Scan on job_organization_id_idx (cost=0.00..2.14 rows=59 width=0) (actual time=0.013..0.013 rows=67 loops=1)

  • Index Cond: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
161. 0.042 0.042 ↑ 1.0 1 7

Index Only Scan using job_pkey on job job_12 (cost=0.06..2.35 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=7)

  • Index Cond: (id = job_13.id)
  • Heap Fetches: 7
162. 0.903 0.903 ↑ 1.2 229 7

Index Scan using application_job_id_idx on application application_9 (cost=0.08..15.18 rows=284 width=32) (actual time=0.008..0.129 rows=229 loops=7)

  • Index Cond: (job_id = job_12.id)
163. 2.452 2.452 ↑ 1.0 1 613

Index Scan using application_pkey on application (cost=0.08..3.78 rows=1 width=804) (actual time=0.004..0.004 rows=1 loops=613)

  • Index Cond: (id = filtered_application_ids.id)
  • Filter: (organization_id = '70b634ce-6379-47f7-be11-aaa2bdbb6aa1'::uuid)
Planning time : 4.305 ms