explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jstf

Settings
# exclusive inclusive rows x rows loops node
1. 8.091 4,548.099 ↑ 1.0 50 1

Limit (cost=2,245,374.99..2,245,385.72 rows=50 width=646) (actual time=4,539.751..4,548.099 rows=50 loops=1)

  • Buffers: shared hit=46805 read=203, temp read=11656 written=12091
2. 0.039 4,540.008 ↑ 4,517.5 50 1

Merge Join (cost=2,245,374.99..2,293,871.52 rows=225,875 width=646) (actual time=4,539.749..4,540.008 rows=50 loops=1)

  • Buffers: shared hit=46805 read=203, temp read=11656 written=12091
3. 0.049 4,539.949 ↑ 4,517.5 50 1

Merge Join (cost=2,245,374.56..2,280,795.14 rows=225,875 width=646) (actual time=4,539.738..4,539.949 rows=50 loops=1)

  • Buffers: shared hit=46801 read=203, temp read=11656 written=12091
4. 0.016 4,539.742 ↑ 4,517.5 50 1

Unique (cost=2,245,374.14..2,246,503.52 rows=225,875 width=16) (actual time=4,539.716..4,539.742 rows=50 loops=1)

  • Buffers: shared hit=46727 read=203, temp read=11656 written=12091
5. 78.676 4,539.726 ↑ 4,517.5 50 1

Sort (cost=2,245,374.14..2,245,938.83 rows=225,875 width=16) (actual time=4,539.715..4,539.726 rows=50 loops=1)

  • Sort Key: published_candidate_1.id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=46727 read=203, temp read=11656 written=12091
6. 24.867 4,461.050 ↑ 1.0 225,224 1

Append (cost=10,555.39..2,221,427.52 rows=225,875 width=16) (actual time=146.943..4,461.05 rows=225,224 loops=1)

  • Buffers: shared hit=46727 read=203, temp read=11250 written=11368
7. 13.143 184.558 ↑ 2.8 24 1

Gather (cost=10,555.39..18,590.79 rows=68 width=16) (actual time=146.942..184.558 rows=24 loops=1)

  • Buffers: shared hit=11305 read=203, temp read=2292 written=2368
8. 0.326 171.415 ↑ 3.5 8 3

Nested Loop (cost=9,555.39..17,583.99 rows=28 width=16) (actual time=141.307..171.415 rows=8 loops=3)

  • Buffers: shared hit=11305 read=203, temp read=2292 written=2368
9. 72.626 171.075 ↑ 1.2 29 3

Hash Join (cost=9,554.96..17,567.61 rows=35 width=16) (actual time=139.629..171.075 rows=29 loops=3)

  • Buffers: shared hit=11042 read=203, temp read=2292 written=2368
10. 25.944 25.944 ↑ 1.2 91,831 3

Seq Scan on candidate_data candidate_data_1 (cost=0..5,898.88 rows=114,788 width=16) (actual time=0.01..25.944 rows=91,831 loops=3)

  • Buffers: shared hit=4548 read=203
11. 36.598 72.505 ↑ 1.3 91,803 3

Hash (cost=7,559.54..7,559.54 rows=114,754 width=16) (actual time=72.505..72.505 rows=91,803 loops=3)

  • Buffers: shared hit=6412, temp written=1116
12. 35.907 35.907 ↑ 1.3 91,803 3

Seq Scan on application application (cost=0..7,559.54 rows=114,754 width=16) (actual time=0.017..35.907 rows=91,803 loops=3)

  • Buffers: shared hit=6412
13. 0.014 0.014 ↓ 0.0 0 86

Index Only Scan using published_candidate_organization_id_id_idx on published_candidate published_candidate_1 (cost=0.42..0.47 rows=1 width=16) (actual time=0.014..0.014 rows=0 loops=86)

  • Index Cond: ((published_candidate_1.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid) AND (published_candidate_1.id = candidate_data_1.id))
  • Buffers: shared hit=263
14. 76.692 4,251.625 ↑ 1.0 225,200 1

Unique (cost=2,171,776.04..2,199,448.6 rows=225,807 width=16) (actual time=3,688.771..4,251.625 rows=225,200 loops=1)

  • Buffers: shared hit=35422, temp read=8958 written=9000
15. 138.283 4,174.933 ↑ 1.0 225,200 1

Merge Join (cost=2,171,776.04..2,198,884.09 rows=225,807 width=16) (actual time=3,688.77..4,174.933 rows=225,200 loops=1)

  • Buffers: shared hit=35422, temp read=8958 written=9000
16. 148.120 3,988.267 ↑ 1.0 225,200 1

Merge Join (cost=2,171,702.28..2,185,808.49 rows=225,835 width=32) (actual time=3,688.742..3,988.267 rows=225,200 loops=1)

  • Buffers: shared hit=34069, temp read=8958 written=9000
17. 51.316 51.316 ↑ 1.0 275,492 1

Index Only Scan using candidate_data_pkey on candidate_data candidate_data_2 (cost=0.42..9,516.8 rows=275,492 width=16) (actual time=0.014..51.316 rows=275,492 loops=1)

  • Buffers: shared hit=1341
18. 44.396 3,788.831 ↑ 1.0 225,200 1

Materialize (cost=2,171,650.85..2,172,780.02 rows=225,835 width=16) (actual time=3,688.722..3,788.831 rows=225,200 loops=1)

  • Buffers: shared hit=32728, temp read=8958 written=9000
19. 206.371 3,744.435 ↑ 1.0 225,200 1

Sort (cost=2,171,650.85..2,172,215.43 rows=225,835 width=16) (actual time=3,688.717..3,744.435 rows=225,200 loops=1)

  • Sort Key: application_1.candidate_id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=32728, temp read=8958 written=9000
20. 214.410 3,538.064 ↑ 1.0 225,200 1

Hash Join (cost=2,132,950.02..2,147,708.07 rows=225,835 width=16) (actual time=3,248.829..3,538.064 rows=225,200 loops=1)

  • Buffers: shared hit=32728, temp read=8239 written=8277
21. 75.505 75.505 ↑ 1.0 275,409 1

Seq Scan on application application_1 (cost=0..9,166.09 rows=275,409 width=32) (actual time=0.012..75.505 rows=275,409 loops=1)

  • Buffers: shared hit=6412
22. 67.665 3,248.149 ↑ 1.0 225,200 1

Hash (cost=2,129,024.08..2,129,024.08 rows=225,835 width=16) (actual time=3,248.148..3,248.149 rows=225,200 loops=1)

  • Buffers: shared hit=26316, temp read=6182 written=6961
23. 67.116 3,180.484 ↑ 1.0 225,200 1

Unique (cost=2,125,636.56..2,126,765.73 rows=225,835 width=16) (actual time=3,072.444..3,180.484 rows=225,200 loops=1)

  • Buffers: shared hit=26316, temp read=6182 written=6220
24. 119.411 3,113.368 ↑ 1.0 225,200 1

Sort (cost=2,125,636.56..2,126,201.15 rows=225,835 width=16) (actual time=3,072.443..3,113.368 rows=225,200 loops=1)

  • Sort Key: "*SELECT* 2".id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=26316, temp read=6182 written=6220
25. 30.645 2,993.957 ↑ 1.0 225,200 1

Append (cost=718,908.2..2,101,693.78 rows=225,835 width=16) (actual time=1,043.201..2,993.957 rows=225,200 loops=1)

  • Buffers: shared hit=26316, temp read=5463 written=5497
26. 36.951 1,301.939 ↑ 1.0 225,199 1

Result (cost=718,908.2..723,672.74 rows=225,833 width=16) (actual time=1,043.2..1,301.939 rows=225,199 loops=1)

  • Buffers: shared hit=13054, temp read=2372 written=2387
27. 114.993 1,264.988 ↑ 1.0 225,199 1

SetOp (cost=718,908.2..721,414.41 rows=225,833 width=20) (actual time=1,043.199..1,264.988 rows=225,199 loops=1)

  • Buffers: shared hit=13054, temp read=2372 written=2387
28. 350.983 1,149.995 ↑ 1.1 450,399 1

Sort (cost=718,908.2..720,161.31 rows=501,242 width=20) (actual time=1,043.193..1,149.995 rows=450,399 loops=1)

  • Sort Key: "*SELECT* 2".id
  • Sort Method: external merge Disk: 13224kB
  • Buffers: shared hit=13054, temp read=2372 written=2387
29. 62.076 799.012 ↑ 1.1 450,399 1

Append (cost=88.97..661,173.25 rows=501,242 width=20) (actual time=1.039..799.012 rows=450,399 loops=1)

  • Buffers: shared hit=13054, temp read=719 written=723
30. 42.608 194.261 ↑ 1.0 225,199 1

Subquery Scan on *SELECT* 2 (cost=88.97..15,056.22 rows=225,833 width=20) (actual time=1.038..194.261 rows=225,199 loops=1)

  • Buffers: shared hit=6444
31. 74.573 151.653 ↑ 1.0 225,199 1

Hash Join (cost=88.97..12,797.89 rows=225,833 width=16) (actual time=1.037..151.653 rows=225,199 loops=1)

  • Buffers: shared hit=6444
32. 76.062 76.062 ↑ 1.0 225,200 1

Seq Scan on application application_2 (cost=0..9,854.61 rows=225,835 width=32) (actual time=0.006..76.062 rows=225,200 loops=1)

  • Filter: (application_2.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
  • Buffers: shared hit=6412
33. 0.249 1.018 ↑ 1,266.0 2 1

Hash (cost=57.32..57.32 rows=2,532 width=16) (actual time=1.018..1.018 rows=2 loops=1)

  • Buffers: shared hit=32
34. 0.769 0.769 ↑ 1.0 2,532 1

Seq Scan on employee employee (cost=0..57.32 rows=2,532 width=16) (actual time=0.006..0.769 rows=2,532 loops=1)

  • Filter: (NOT employee.is_alumni)
  • Buffers: shared hit=32
35. 44.333 542.675 ↑ 1.2 225,200 1

Subquery Scan on *SELECT* 1 (cost=620,104.65..643,610.81 rows=275,409 width=20) (actual time=389.138..542.675 rows=225,200 loops=1)

  • Buffers: shared hit=6610, temp read=719 written=723
36. 60.060 498.342 ↑ 1.2 225,200 1

Unique (cost=620,104.65..640,856.72 rows=275,409 width=16) (actual time=389.136..498.342 rows=225,200 loops=1)

  • Buffers: shared hit=6610, temp read=719 written=723
37. 190.797 438.282 ↑ 18.4 225,200 1

Sort (cost=620,104.65..630,480.69 rows=4,150,414 width=16) (actual time=389.135..438.282 rows=225,200 loops=1)

  • Sort Key: application_3.id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=6610, temp read=719 written=723
38. 85.049 247.485 ↑ 18.4 225,200 1

Hash Join (cost=11,383.8..22,012.05 rows=4,150,414 width=16) (actual time=6.752..247.485 rows=225,200 loops=1)

  • Buffers: shared hit=6610
39. 121.340 157.230 ↑ 1.0 275,409 1

Hash Join (cost=136.01..10,026 rows=275,409 width=48) (actual time=1.535..157.23 rows=275,409 loops=1)

  • Buffers: shared hit=6475
40. 34.378 34.378 ↑ 1.0 275,409 1

Seq Scan on application application_3 (cost=0..9,166.09 rows=275,409 width=32) (actual time=0.011..34.378 rows=275,409 loops=1)

  • Buffers: shared hit=6412
41. 0.752 1.512 ↑ 1.0 3,245 1

Hash (cost=95.45..95.45 rows=3,245 width=16) (actual time=1.512..1.512 rows=3,245 loops=1)

  • Buffers: shared hit=63
42. 0.760 0.760 ↑ 1.0 3,245 1

Seq Scan on job job (cost=0..95.45 rows=3,245 width=16) (actual time=0.004..0.76 rows=3,245 loops=1)

  • Buffers: shared hit=63
43. 0.849 5.206 ↑ 1.0 3,009 1

Hash (cost=11,210.11..11,210.11 rows=3,014 width=16) (actual time=5.206..5.206 rows=3,009 loops=1)

  • Buffers: shared hit=135
44. 2.297 4.357 ↑ 1.0 3,009 1

Aggregate (cost=11,149.83..11,179.97 rows=3,014 width=16) (actual time=3.649..4.357 rows=3,009 loops=1)

  • Buffers: shared hit=135
45. 0.398 2.060 ↑ 1.0 3,009 1

Append (cost=0..11,142.29 rows=3,014 width=16) (actual time=0.006..2.06 rows=3,009 loops=1)

  • Buffers: shared hit=135
46. 0.941 0.941 ↑ 1.0 3,009 1

Seq Scan on job job_1 (cost=0..103.56 rows=3,009 width=16) (actual time=0.005..0.941 rows=3,009 loops=1)

  • Filter: ((NOT job_1.confidential) AND (job_1.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
47. 0.000 0.054 ↓ 0.0 0 1

Nested Loop (cost=4.47..9.78 rows=1 width=16) (actual time=0.054..0.054 rows=0 loops=1)

  • Buffers: shared hit=4
48. 0.018 0.054 ↓ 0.0 0 1

Hash Join (cost=4.19..5.47 rows=1 width=16) (actual time=0.053..0.054 rows=0 loops=1)

  • Buffers: shared hit=4
49. 0.010 0.010 ↑ 20.0 1 1

Seq Scan on security_role security_role (cost=0..1.2 rows=20 width=16) (actual time=0.01..0.01 rows=1 loops=1)

  • Filter: security_role.can_see_candidates
  • Buffers: shared hit=1
50. 0.000 0.026 ↓ 0.0 0 1

Hash (cost=4.17..4.17 rows=1 width=32) (actual time=0.026..0.026 rows=0 loops=1)

  • Buffers: shared hit=3
51. 0.026 0.026 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles (cost=0..4.17 rows=1 width=32) (actual time=0.026..0.026 rows=0 loops=1)

  • Filter: (user_job_security_roles.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=3
52. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using job_organization_id_id_idx on job job_2 (cost=0.28..4.3 rows=1 width=16) (never executed)

  • Index Cond: ((job_2.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid) AND (job_2.id = user_job_security_roles.job_id))
53. 0.000 0.047 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,867.74 rows=3 width=16) (actual time=0.047..0.047 rows=0 loops=1)

  • Buffers: shared hit=3
54. 0.010 0.010 ↑ 1.0 20 1

Seq Scan on security_role security_role_1 (cost=0..1.2 rows=20 width=16) (actual time=0.003..0.01 rows=20 loops=1)

  • Filter: security_role_1.can_see_candidates
  • Buffers: shared hit=1
55. 0.013 0.040 ↓ 0.0 0 20

Materialize (cost=1.26..10,865.64 rows=3 width=32) (actual time=0.002..0.002 rows=0 loops=20)

  • Buffers: shared hit=2
56. 0.000 0.027 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,865.63 rows=3 width=32) (actual time=0.027..0.027 rows=0 loops=1)

  • Buffers: shared hit=2
57. 0.012 0.027 ↓ 0.0 0 1

Hash Join (cost=1.26..4.89 rows=1 width=86) (actual time=0.026..0.027 rows=0 loops=1)

  • Buffers: shared hit=2
58. 0.005 0.005 ↑ 45.0 1 1

Seq Scan on team team (cost=0..3.45 rows=45 width=86) (actual time=0.005..0.005 rows=1 loops=1)

  • Buffers: shared hit=1
59. 0.001 0.010 ↓ 0.0 0 1

Hash (cost=1.25..1.25 rows=1 width=32) (actual time=0.01..0.01 rows=0 loops=1)

  • Buffers: shared hit=1
60. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles (cost=0..1.25 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Filter: (user_team_security_roles.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=1
61. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on job job_3 (cost=0..103.56 rows=3,009 width=32) (never executed)

  • Filter: (job_3.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
62.          

SubPlan (for Nested Loop)

63. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on team team_3 (cost=0..3.56 rows=1 width=70) (never executed)

  • Filter: (team_3.id = job_3.team_id)
64. 0.001 0.620 ↓ 0.0 0 1

Result (cost=0.28..116.02 rows=1 width=16) (actual time=0.62..0.62 rows=0 loops=1)

  • Buffers: shared hit=65
65. 0.000 0.619 ↓ 0.0 0 1

SetOp (cost=0.28..116.01 rows=1 width=20) (actual time=0.619..0.619 rows=0 loops=1)

  • Buffers: shared hit=65
66. 0.001 0.619 ↓ 0.0 0 1

Append (cost=0.28..116.01 rows=2 width=20) (actual time=0.618..0.619 rows=0 loops=1)

  • Buffers: shared hit=65
67. 0.000 0.016 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4_1 (cost=0.28..4.31 rows=1 width=20) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=2
68. 0.016 0.016 ↓ 0.0 0 1

Index Scan using job_confidential_idx on job job_4 (cost=0.28..4.3 rows=1 width=16) (actual time=0.015..0.016 rows=0 loops=1)

  • Index Cond: (job_4.confidential = true)
  • Filter: (job_4.confidential AND (job_4.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=2
69. 0.001 0.602 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5_1 (cost=0..111.69 rows=1 width=20) (actual time=0.601..0.602 rows=0 loops=1)

  • Buffers: shared hit=63
70. 0.601 0.601 ↓ 0.0 0 1

Seq Scan on job job_5 (cost=0..111.67 rows=1 width=16) (actual time=0.601..0.601 rows=0 loops=1)

  • Filter: ((job_5.author_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid) AND (job_5.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
71. 0.001 1,661.373 ↑ 2.0 1 1

Result (cost=0.42..1,376,891.87 rows=2 width=16) (actual time=1,661.373..1,661.373 rows=1 loops=1)

  • Buffers: shared hit=13262, temp read=3091 written=3110
72. 42.847 1,661.372 ↑ 2.0 1 1

SetOp (cost=0.42..1,376,891.85 rows=2 width=20) (actual time=1,661.372..1,661.372 rows=1 loops=1)

  • Buffers: shared hit=13262, temp read=3091 written=3110
73. 32.047 1,618.525 ↑ 1.2 225,201 1

Append (cost=0.42..1,376,203.32 rows=275,411 width=20) (actual time=0.371..1,618.525 rows=225,201 loops=1)

  • Buffers: shared hit=13262, temp read=3091 written=3110
74. 0.002 1.708 ↑ 2.0 1 1

Subquery Scan on *SELECT* 5 (cost=0.42..15,520.95 rows=2 width=20) (actual time=0.37..1.708 rows=1 loops=1)

  • Buffers: shared hit=43
75. 1.089 1.706 ↑ 2.0 1 1

Nested Loop (cost=0.42..15,520.93 rows=2 width=16) (actual time=0.368..1.706 rows=1 loops=1)

  • Buffers: shared hit=43
76. 0.617 0.617 ↑ 1.0 2,531 1

Seq Scan on employee employee_1 (cost=0..63.65 rows=2,531 width=16) (actual time=0.017..0.617 rows=2,531 loops=1)

  • Filter: ((NOT employee_1.is_alumni) AND (employee_1.user_id IS DISTINCT FROM '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid))
  • Buffers: shared hit=32
77. 0.000 0.000 ↓ 0.0 0 2,531

Index Scan using application_candidate_id_idx on application application_4 (cost=0.42..6.1 rows=1 width=32) (actual time=0..0 rows=0 loops=2,531)

  • Index Cond: (application_4.candidate_id = employee_1.candidate_id)
  • Filter: (application_4.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
  • Buffers: shared hit=11
78. 41.602 1,584.770 ↑ 1.2 225,200 1

Result (cost=1,353,797.14..1,359,305.32 rows=275,409 width=20) (actual time=1,332.299..1,584.77 rows=225,200 loops=1)

  • Buffers: shared hit=13219, temp read=3091 written=3110
79. 118.782 1,543.168 ↑ 1.2 225,200 1

SetOp (cost=1,353,797.14..1,356,551.23 rows=275,409 width=20) (actual time=1,332.297..1,543.168 rows=225,200 loops=1)

  • Buffers: shared hit=13219, temp read=3091 written=3110
80. 258.556 1,424.386 ↑ 1.2 450,400 1

Sort (cost=1,353,797.14..1,355,174.18 rows=550,818 width=20) (actual time=1,332.292..1,424.386 rows=450,400 loops=1)

  • Sort Key: "*SELECT* 3".id
  • Sort Method: external merge Disk: 13224kB
  • Buffers: shared hit=13219, temp read=3091 written=3110
81. 60.556 1,165.830 ↑ 1.2 450,400 1

Append (cost=620,104.65..1,289,975.29 rows=550,818 width=20) (actual time=392.8..1,165.83 rows=450,400 loops=1)

  • Buffers: shared hit=13219, temp read=1438 written=1446
82. 45.885 551.656 ↑ 1.2 225,200 1

Subquery Scan on *SELECT* 3 (cost=620,104.65..643,610.81 rows=275,409 width=20) (actual time=392.799..551.656 rows=225,200 loops=1)

  • Buffers: shared hit=6610, temp read=719 written=723
83. 60.929 505.771 ↑ 1.2 225,200 1

Unique (cost=620,104.65..640,856.72 rows=275,409 width=16) (actual time=392.797..505.771 rows=225,200 loops=1)

  • Buffers: shared hit=6610, temp read=719 written=723
84. 193.685 444.842 ↑ 18.4 225,200 1

Sort (cost=620,104.65..630,480.69 rows=4,150,414 width=16) (actual time=392.796..444.842 rows=225,200 loops=1)

  • Sort Key: application_5.id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=6610, temp read=719 written=723
85. 87.052 251.157 ↑ 18.4 225,200 1

Hash Join (cost=11,383.8..22,012.05 rows=4,150,414 width=16) (actual time=5.593..251.157 rows=225,200 loops=1)

  • Buffers: shared hit=6610
86. 123.083 159.921 ↑ 1.0 275,409 1

Hash Join (cost=136.01..10,026 rows=275,409 width=48) (actual time=1.397..159.921 rows=275,409 loops=1)

  • Buffers: shared hit=6475
87. 35.459 35.459 ↑ 1.0 275,409 1

Seq Scan on application application_5 (cost=0..9,166.09 rows=275,409 width=32) (actual time=0.005..35.459 rows=275,409 loops=1)

  • Buffers: shared hit=6412
88. 0.748 1.379 ↑ 1.0 3,245 1

Hash (cost=95.45..95.45 rows=3,245 width=16) (actual time=1.379..1.379 rows=3,245 loops=1)

  • Buffers: shared hit=63
89. 0.631 0.631 ↑ 1.0 3,245 1

Seq Scan on job job_6 (cost=0..95.45 rows=3,245 width=16) (actual time=0.004..0.631 rows=3,245 loops=1)

  • Buffers: shared hit=63
90. 0.694 4.184 ↑ 1.0 3,009 1

Hash (cost=11,210.11..11,210.11 rows=3,014 width=16) (actual time=4.184..4.184 rows=3,009 loops=1)

  • Buffers: shared hit=135
91. 1.602 3.490 ↑ 1.0 3,009 1

Aggregate (cost=11,149.83..11,179.97 rows=3,014 width=16) (actual time=2.911..3.49 rows=3,009 loops=1)

  • Buffers: shared hit=135
92. 0.435 1.888 ↑ 1.0 3,009 1

Append (cost=0..11,142.29 rows=3,014 width=16) (actual time=0.004..1.888 rows=3,009 loops=1)

  • Buffers: shared hit=135
93. 0.891 0.891 ↑ 1.0 3,009 1

Seq Scan on job job_7 (cost=0..103.56 rows=3,009 width=16) (actual time=0.004..0.891 rows=3,009 loops=1)

  • Filter: ((NOT job_7.confidential) AND (job_7.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
94. 0.001 0.029 ↓ 0.0 0 1

Nested Loop (cost=4.47..9.78 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=1)

  • Buffers: shared hit=4
95. 0.004 0.028 ↓ 0.0 0 1

Hash Join (cost=4.19..5.47 rows=1 width=16) (actual time=0.028..0.028 rows=0 loops=1)

  • Buffers: shared hit=4
96. 0.007 0.007 ↑ 20.0 1 1

Seq Scan on security_role security_role_2 (cost=0..1.2 rows=20 width=16) (actual time=0.007..0.007 rows=1 loops=1)

  • Filter: security_role_2.can_see_candidates
  • Buffers: shared hit=1
97. 0.000 0.017 ↓ 0.0 0 1

Hash (cost=4.17..4.17 rows=1 width=32) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=3
98. 0.017 0.017 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles_1 (cost=0..4.17 rows=1 width=32) (actual time=0.017..0.017 rows=0 loops=1)

  • Filter: (user_job_security_roles_1.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=3
99. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using job_organization_id_id_idx on job job_8 (cost=0.28..4.3 rows=1 width=16) (never executed)

  • Index Cond: ((job_8.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid) AND (job_8.id = user_job_security_roles_1.job_id))
100. 0.013 0.039 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,867.74 rows=3 width=16) (actual time=0.039..0.039 rows=0 loops=1)

  • Buffers: shared hit=3
101. 0.006 0.006 ↑ 1.0 20 1

Seq Scan on security_role security_role_3 (cost=0..1.2 rows=20 width=16) (actual time=0.002..0.006 rows=20 loops=1)

  • Filter: security_role_3.can_see_candidates
  • Buffers: shared hit=1
102. 0.000 0.020 ↓ 0.0 0 20

Materialize (cost=1.26..10,865.64 rows=3 width=32) (actual time=0.001..0.001 rows=0 loops=20)

  • Buffers: shared hit=2
103. 0.000 0.024 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,865.63 rows=3 width=32) (actual time=0.024..0.024 rows=0 loops=1)

  • Buffers: shared hit=2
104. 0.014 0.024 ↓ 0.0 0 1

Hash Join (cost=1.26..4.89 rows=1 width=86) (actual time=0.024..0.024 rows=0 loops=1)

  • Buffers: shared hit=2
105. 0.003 0.003 ↑ 45.0 1 1

Seq Scan on team team_1 (cost=0..3.45 rows=45 width=86) (actual time=0.003..0.003 rows=1 loops=1)

  • Buffers: shared hit=1
106. 0.000 0.007 ↓ 0.0 0 1

Hash (cost=1.25..1.25 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Buffers: shared hit=1
107. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_1 (cost=0..1.25 rows=1 width=32) (actual time=0.006..0.007 rows=0 loops=1)

  • Filter: (user_team_security_roles_1.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=1
108. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on job job_9 (cost=0..103.56 rows=3,009 width=32) (never executed)

  • Filter: (job_9.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
109.          

SubPlan (for Nested Loop)

110. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on team team_4 (cost=0..3.56 rows=1 width=70) (never executed)

  • Filter: (team_4.id = job_9.team_id)
111. 0.001 0.494 ↓ 0.0 0 1

Result (cost=0.28..116.02 rows=1 width=16) (actual time=0.494..0.494 rows=0 loops=1)

  • Buffers: shared hit=65
112. 0.000 0.493 ↓ 0.0 0 1

SetOp (cost=0.28..116.01 rows=1 width=20) (actual time=0.493..0.493 rows=0 loops=1)

  • Buffers: shared hit=65
113. 0.001 0.493 ↓ 0.0 0 1

Append (cost=0.28..116.01 rows=2 width=20) (actual time=0.493..0.493 rows=0 loops=1)

  • Buffers: shared hit=65
114. 0.000 0.009 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4_2 (cost=0.28..4.31 rows=1 width=20) (actual time=0.009..0.009 rows=0 loops=1)

  • Buffers: shared hit=2
115. 0.009 0.009 ↓ 0.0 0 1

Index Scan using job_confidential_idx on job job_10 (cost=0.28..4.3 rows=1 width=16) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: (job_10.confidential = true)
  • Filter: (job_10.confidential AND (job_10.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=2
116. 0.001 0.483 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5_2 (cost=0..111.69 rows=1 width=20) (actual time=0.483..0.483 rows=0 loops=1)

  • Buffers: shared hit=63
117. 0.482 0.482 ↓ 0.0 0 1

Seq Scan on job job_11 (cost=0..111.67 rows=1 width=16) (actual time=0.482..0.482 rows=0 loops=1)

  • Filter: ((job_11.author_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid) AND (job_11.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
118. 44.607 553.618 ↑ 1.2 225,200 1

Subquery Scan on *SELECT* 4 (cost=620,104.23..643,610.39 rows=275,409 width=20) (actual time=398.272..553.618 rows=225,200 loops=1)

  • Buffers: shared hit=6609, temp read=719 written=723
119. 60.676 509.011 ↑ 1.2 225,200 1

Unique (cost=620,104.23..640,856.3 rows=275,409 width=16) (actual time=398.27..509.011 rows=225,200 loops=1)

  • Buffers: shared hit=6609, temp read=719 written=723
120. 195.306 448.335 ↑ 18.4 225,200 1

Sort (cost=620,104.23..630,480.26 rows=4,150,414 width=16) (actual time=398.268..448.335 rows=225,200 loops=1)

  • Sort Key: application_6.id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=6609, temp read=719 written=723
121. 88.364 253.029 ↑ 18.4 225,200 1

Hash Join (cost=11,383.37..22,011.63 rows=4,150,414 width=16) (actual time=6.012..253.029 rows=225,200 loops=1)

  • Buffers: shared hit=6609
122. 123.404 160.237 ↑ 1.0 275,409 1

Hash Join (cost=136.01..10,026 rows=275,409 width=48) (actual time=1.57..160.237 rows=275,409 loops=1)

  • Buffers: shared hit=6475
123. 35.305 35.305 ↑ 1.0 275,409 1

Seq Scan on application application_6 (cost=0..9,166.09 rows=275,409 width=32) (actual time=0.016..35.305 rows=275,409 loops=1)

  • Buffers: shared hit=6412
124. 0.841 1.528 ↑ 1.0 3,245 1

Hash (cost=95.45..95.45 rows=3,245 width=16) (actual time=1.527..1.528 rows=3,245 loops=1)

  • Buffers: shared hit=63
125. 0.687 0.687 ↑ 1.0 3,245 1

Seq Scan on job job_12 (cost=0..95.45 rows=3,245 width=16) (actual time=0.005..0.687 rows=3,245 loops=1)

  • Buffers: shared hit=63
126. 0.754 4.428 ↑ 1.0 3,009 1

Hash (cost=11,209.69..11,209.69 rows=3,014 width=16) (actual time=4.428..4.428 rows=3,009 loops=1)

  • Buffers: shared hit=134
127. 1.744 3.674 ↑ 1.0 3,009 1

Aggregate (cost=11,149.41..11,179.55 rows=3,014 width=16) (actual time=3.047..3.674 rows=3,009 loops=1)

  • Buffers: shared hit=134
128. 0.407 1.930 ↑ 1.0 3,009 1

Append (cost=0..11,141.87 rows=3,014 width=16) (actual time=0.006..1.93 rows=3,009 loops=1)

  • Buffers: shared hit=134
129. 0.917 0.917 ↑ 1.0 3,009 1

Seq Scan on job job_13 (cost=0..103.56 rows=3,009 width=16) (actual time=0.005..0.917 rows=3,009 loops=1)

  • Filter: ((NOT job_13.confidential) AND (job_13.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
130. 0.001 0.023 ↓ 0.0 0 1

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

  • Buffers: shared hit=3
131. 0.001 0.022 ↓ 0.0 0 1

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

  • Buffers: shared hit=3
132. 0.021 0.021 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles_2 (cost=0..4.17 rows=1 width=32) (actual time=0.021..0.021 rows=0 loops=1)

  • Filter: (user_job_security_roles_2.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=3
133. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using job_organization_id_id_idx on job job_14 (cost=0.28..4.3 rows=1 width=16) (never executed)

  • Index Cond: ((job_14.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid) AND (job_14.id = user_job_security_roles_2.job_id))
134. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on security_role security_role_4 (cost=0..1.2 rows=10 width=16) (never executed)

  • Filter: security_role_4.can_see_and_edit_hired_candidates
135. 0.000 0.046 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,867.29 rows=3 width=16) (actual time=0.045..0.046 rows=0 loops=1)

  • Buffers: shared hit=3
136. 0.016 0.016 ↑ 1.0 10 1

Seq Scan on security_role security_role_5 (cost=0..1.2 rows=10 width=16) (actual time=0.011..0.016 rows=10 loops=1)

  • Filter: security_role_5.can_see_and_edit_hired_candidates
  • Buffers: shared hit=1
137. 0.006 0.030 ↓ 0.0 0 10

Materialize (cost=1.26..10,865.64 rows=3 width=32) (actual time=0.003..0.003 rows=0 loops=10)

  • Buffers: shared hit=2
138. 0.001 0.024 ↓ 0.0 0 1

Nested Loop (cost=1.26..10,865.63 rows=3 width=32) (actual time=0.024..0.024 rows=0 loops=1)

  • Buffers: shared hit=2
139. 0.012 0.023 ↓ 0.0 0 1

Hash Join (cost=1.26..4.89 rows=1 width=86) (actual time=0.023..0.023 rows=0 loops=1)

  • Buffers: shared hit=2
140. 0.004 0.004 ↑ 45.0 1 1

Seq Scan on team team_2 (cost=0..3.45 rows=45 width=86) (actual time=0.004..0.004 rows=1 loops=1)

  • Buffers: shared hit=1
141. 0.000 0.007 ↓ 0.0 0 1

Hash (cost=1.25..1.25 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Buffers: shared hit=1
142. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on user_team_security_roles user_team_security_roles_2 (cost=0..1.25 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: (user_team_security_roles_2.user_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid)
  • Buffers: shared hit=1
143. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on job job_15 (cost=0..103.56 rows=3,009 width=32) (never executed)

  • Filter: (job_15.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
144.          

SubPlan (for Nested Loop)

145. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on team team_5 (cost=0..3.56 rows=1 width=70) (never executed)

  • Filter: (team_5.id = job_15.team_id)
146. 0.001 0.537 ↓ 0.0 0 1

Result (cost=0.28..116.02 rows=1 width=16) (actual time=0.537..0.537 rows=0 loops=1)

  • Buffers: shared hit=65
147. 0.001 0.536 ↓ 0.0 0 1

SetOp (cost=0.28..116.01 rows=1 width=20) (actual time=0.536..0.536 rows=0 loops=1)

  • Buffers: shared hit=65
148. 0.001 0.535 ↓ 0.0 0 1

Append (cost=0.28..116.01 rows=2 width=20) (actual time=0.535..0.535 rows=0 loops=1)

  • Buffers: shared hit=65
149. 0.001 0.013 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4_3 (cost=0.28..4.31 rows=1 width=20) (actual time=0.013..0.013 rows=0 loops=1)

  • Buffers: shared hit=2
150. 0.012 0.012 ↓ 0.0 0 1

Index Scan using job_confidential_idx on job job_16 (cost=0.28..4.3 rows=1 width=16) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (job_16.confidential = true)
  • Filter: (job_16.confidential AND (job_16.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=2
151. 0.001 0.521 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5_3 (cost=0..111.69 rows=1 width=20) (actual time=0.521..0.521 rows=0 loops=1)

  • Buffers: shared hit=63
152. 0.520 0.520 ↓ 0.0 0 1

Seq Scan on job job_17 (cost=0..111.67 rows=1 width=16) (actual time=0.52..0.52 rows=0 loops=1)

  • Filter: ((job_17.author_id = '818f76d8-34c7-4cf3-a42b-de5f0b897a43'::uuid) AND (job_17.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid))
  • Buffers: shared hit=63
153. 48.383 48.383 ↑ 1.0 275,458 1

Index Only Scan using published_candidate_pkey on published_candidate published_candidate_2 (cost=0.42..9,564.29 rows=275,458 width=16) (actual time=0.024..48.383 rows=275,458 loops=1)

  • Buffers: shared hit=1353
154. 0.158 0.158 ↑ 3,880.2 71 1

Index Scan using candidate_data_pkey on candidate_data candidate_data (cost=0.42..28,520.71 rows=275,492 width=630) (actual time=0.016..0.158 rows=71 loops=1)

  • Buffers: shared hit=74
155. 0.020 0.020 ↑ 3,879.7 71 1

Index Only Scan using published_candidate_pkey on published_candidate published_candidate (cost=0.42..9,564.29 rows=275,458 width=16) (actual time=0.008..0.02 rows=71 loops=1)

  • Buffers: shared hit=4
Planning time : 12.381 ms
Execution time : 4,562.024 ms