explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G6rt

Settings
# exclusive inclusive rows x rows loops node
1. 5.972 4,582.942 ↑ 1.0 50 1

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

  • Buffers: shared hit=44972 read=2036, temp read=11660 written=12095
2. 0.043 4,576.970 ↑ 4,517.5 50 1

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

  • Buffers: shared hit=44972 read=2036, temp read=11660 written=12095
3. 0.056 4,576.905 ↑ 4,517.5 50 1

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

  • Buffers: shared hit=44968 read=2036, temp read=11660 written=12095
4. 0.018 4,576.679 ↑ 4,517.5 50 1

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

  • Buffers: shared hit=44894 read=2036, temp read=11660 written=12095
5. 85.110 4,576.661 ↑ 4,517.5 50 1

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

  • Sort Key: published_candidate_1.id
  • Sort Method: external merge Disk: 5752kB
  • Buffers: shared hit=44894 read=2036, temp read=11660 written=12095
6. 28.889 4,491.551 ↑ 1.0 225,224 1

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

  • Buffers: shared hit=44894 read=2036, temp read=11254 written=11372
7. 11.657 198.027 ↑ 2.8 24 1

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

  • Buffers: shared hit=10083 read=1425, temp read=2296 written=2372
8. 0.413 186.370 ↑ 3.5 8 3

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

  • Buffers: shared hit=10083 read=1425, temp read=2296 written=2372
9. 80.238 185.941 ↑ 1.2 29 3

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

  • Buffers: shared hit=9820 read=1425, temp read=2296 written=2372
10. 27.752 27.752 ↑ 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.06..27.752 rows=91,831 loops=3)

  • Buffers: shared hit=3609 read=1142
11. 39.565 77.951 ↑ 1.3 91,803 3

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

  • Buffers: shared hit=6129 read=283, temp written=1120
12. 38.386 38.386 ↑ 1.3 91,803 3

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

  • Buffers: shared hit=6129 read=283
13. 0.016 0.016 ↓ 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.016..0.016 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. 79.837 4,264.635 ↑ 1.0 225,200 1

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

  • Buffers: shared hit=34811 read=611, temp read=8958 written=9000
15. 144.187 4,184.798 ↑ 1.0 225,200 1

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

  • Buffers: shared hit=34811 read=611, temp read=8958 written=9000
16. 154.167 3,990.671 ↑ 1.0 225,200 1

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

  • Buffers: shared hit=33458 read=611, temp read=8958 written=9000
17. 53.928 53.928 ↑ 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.023..53.928 rows=275,492 loops=1)

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

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

  • Buffers: shared hit=32117 read=611, temp read=8958 written=9000
19. 211.104 3,735.893 ↑ 1.0 225,200 1

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

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

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

  • Buffers: shared hit=32117 read=611, temp read=8239 written=8277
21. 76.712 76.712 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6353 read=59
22. 69.857 3,229.803 ↑ 1.0 225,200 1

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

  • Buffers: shared hit=25764 read=552, temp read=6182 written=6961
23. 69.830 3,159.946 ↑ 1.0 225,200 1

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

  • Buffers: shared hit=25764 read=552, temp read=6182 written=6220
24. 116.976 3,090.116 ↑ 1.0 225,200 1

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

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

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

  • Buffers: shared hit=25764 read=552, temp read=5463 written=5497
26. 36.751 1,321.855 ↑ 1.0 225,199 1

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

  • Buffers: shared hit=12714 read=340, temp read=2372 written=2387
27. 114.716 1,285.104 ↑ 1.0 225,199 1

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

  • Buffers: shared hit=12714 read=340, temp read=2372 written=2387
28. 351.116 1,170.388 ↑ 1.1 450,399 1

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

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

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

  • Buffers: shared hit=12714 read=340, temp read=719 written=723
30. 43.687 197.986 ↑ 1.0 225,199 1

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

  • Buffers: shared hit=6258 read=186
31. 76.748 154.299 ↑ 1.0 225,199 1

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

  • Buffers: shared hit=6258 read=186
32. 76.493 76.493 ↑ 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.493 rows=225,200 loops=1)

  • Filter: (application_2.organization_id = 'ec647f56-f27a-49a1-84af-021ad0a19f21'::uuid)
  • Buffers: shared hit=6226 read=186
33. 0.261 1.058 ↑ 1,266.0 2 1

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

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

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

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

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

  • Buffers: shared hit=6456 read=154, temp read=719 written=723
36. 62.322 511.482 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=6456 read=154, temp read=719 written=723
37. 196.979 449.160 ↑ 18.4 225,200 1

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

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

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

  • Buffers: shared hit=6456 read=154
39. 123.730 160.786 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6321 read=154
40. 35.361 35.361 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6258 read=154
41. 0.841 1.695 ↑ 1.0 3,245 1

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

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

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

  • Buffers: shared hit=63
43. 0.869 4.811 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
44. 1.872 3.942 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
45. 0.422 2.070 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
46. 0.954 0.954 ↑ 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.954 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.048 ↓ 0.0 0 1

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

  • Buffers: shared hit=4
48. 0.012 0.048 ↓ 0.0 0 1

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

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

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

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

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

  • Buffers: shared hit=3
51. 0.025 0.025 ↓ 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.025..0.025 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.045 ↓ 0.0 0 1

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

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

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

  • Filter: security_role_1.can_see_candidates
  • Buffers: shared hit=1
55. 0.015 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.025 ↓ 0.0 0 1

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

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

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

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

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

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

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

  • Buffers: shared hit=1
60. 0.008 0.008 ↓ 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.008..0.008 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.000 0.601 ↓ 0.0 0 1

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

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

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

  • Buffers: shared hit=65
66. 0.002 0.600 ↓ 0.0 0 1

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

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

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

  • Buffers: shared hit=2
68. 0.015 0.015 ↓ 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.015 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.000 0.583 ↓ 0.0 0 1

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

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

Seq Scan on job job_5 (cost=0..111.67 rows=1 width=16) (actual time=0.583..0.583 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,620.933 ↑ 2.0 1 1

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

  • Buffers: shared hit=13050 read=212, temp read=3091 written=3110
72. 41.055 1,620.932 ↑ 2.0 1 1

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

  • Buffers: shared hit=13050 read=212, temp read=3091 written=3110
73. 30.781 1,579.877 ↑ 1.2 225,201 1

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

  • Buffers: shared hit=13050 read=212, temp read=3091 written=3110
74. 0.002 1.715 ↑ 2.0 1 1

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

  • Buffers: shared hit=43
75. 1.094 1.713 ↑ 2.0 1 1

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

  • Buffers: shared hit=43
76. 0.619 0.619 ↑ 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.619 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. 40.160 1,547.381 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=13007 read=212, temp read=3091 written=3110
79. 114.168 1,507.221 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=13007 read=212, temp read=3091 written=3110
80. 253.750 1,393.053 ↑ 1.2 450,400 1

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

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

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

  • Buffers: shared hit=13007 read=212, temp read=1438 written=1446
82. 45.454 535.569 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=6488 read=122, temp read=719 written=723
83. 60.787 490.115 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=6488 read=122, temp read=719 written=723
84. 188.254 429.328 ↑ 18.4 225,200 1

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

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

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

  • Buffers: shared hit=6488 read=122
86. 117.886 153.560 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6353 read=122
87. 34.273 34.273 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6290 read=122
88. 0.772 1.401 ↑ 1.0 3,245 1

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

  • Buffers: shared hit=63
89. 0.629 0.629 ↑ 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.629 rows=3,245 loops=1)

  • Buffers: shared hit=63
90. 0.704 4.116 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
91. 1.586 3.412 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
92. 0.386 1.826 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=135
93. 0.870 0.870 ↑ 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.87 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.000 0.032 ↓ 0.0 0 1

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

  • Buffers: shared hit=4
95. 0.010 0.032 ↓ 0.0 0 1

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

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

Seq Scan on security_role security_role_2 (cost=0..1.2 rows=20 width=16) (actual time=0.004..0.005 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.012 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.007 0.007 ↑ 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.007 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.001 0.022 ↓ 0.0 0 1

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

  • Buffers: shared hit=2
104. 0.011 0.021 ↓ 0.0 0 1

Hash Join (cost=1.26..4.89 rows=1 width=86) (actual time=0.021..0.021 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.007..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.000 0.499 ↓ 0.0 0 1

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

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

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

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

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

  • Buffers: shared hit=65
114. 0.001 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.008 0.008 ↓ 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.008..0.008 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.000 0.489 ↓ 0.0 0 1

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

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

Seq Scan on job job_11 (cost=0..111.67 rows=1 width=16) (actual time=0.489..0.489 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.050 544.064 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=6519 read=90, temp read=719 written=723
119. 59.991 500.014 ↑ 1.2 225,200 1

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

  • Buffers: shared hit=6519 read=90, temp read=719 written=723
120. 188.438 440.023 ↑ 18.4 225,200 1

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

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

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

  • Buffers: shared hit=6519 read=90
122. 122.412 159.252 ↑ 1.0 275,409 1

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

  • Buffers: shared hit=6385 read=90
123. 35.452 35.452 ↑ 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.452 rows=275,409 loops=1)

  • Buffers: shared hit=6322 read=90
124. 0.751 1.388 ↑ 1.0 3,245 1

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

  • Buffers: shared hit=63
125. 0.637 0.637 ↑ 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.637 rows=3,245 loops=1)

  • Buffers: shared hit=63
126. 0.697 4.100 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=134
127. 1.580 3.403 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=134
128. 0.367 1.823 ↑ 1.0 3,009 1

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

  • Buffers: shared hit=134
129. 0.903 0.903 ↑ 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.903 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.000 0.021 ↓ 0.0 0 1

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

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

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

  • Buffers: shared hit=3
132. 0.020 0.020 ↓ 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.02..0.02 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.044 ↓ 0.0 0 1

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

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

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

  • Filter: security_role_5.can_see_and_edit_hired_candidates
  • Buffers: shared hit=1
137. 0.008 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.000 0.022 ↓ 0.0 0 1

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

  • Buffers: shared hit=2
139. 0.013 0.022 ↓ 0.0 0 1

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

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

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

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

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

  • Buffers: shared hit=1
142. 0.006 0.006 ↓ 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.006..0.006 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.488 ↓ 0.0 0 1

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

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

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

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

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

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

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

  • Buffers: shared hit=2
150. 0.011 0.011 ↓ 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.011..0.011 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.000 0.474 ↓ 0.0 0 1

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

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

Seq Scan on job job_17 (cost=0..111.67 rows=1 width=16) (actual time=0.474..0.474 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. 49.940 49.940 ↑ 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.03..49.94 rows=275,458 loops=1)

  • Buffers: shared hit=1353
154. 0.170 0.170 ↑ 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.011..0.17 rows=71 loops=1)

  • Buffers: shared hit=74
155. 0.022 0.022 ↑ 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.009..0.022 rows=71 loops=1)

  • Buffers: shared hit=4
Planning time : 18.537 ms
Execution time : 4,593.615 ms