explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KIcV

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 0.574 ↓ 0.0 0 1

Limit (cost=18,575.05..18,588.19 rows=50 width=717) (actual time=0.56..0.574 rows=0 loops=1)

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

Merge Join (cost=18,575.05..51,540.32 rows=125,386 width=717) (actual time=0.542..0.55 rows=0 loops=1)

  • Buffers: shared hit=14
3. 0.037 0.037 ↑ 225,695.0 1 1

Index Scan using application_pkey on application application (cost=0.42..28,953.34 rows=225,695 width=717) (actual time=0.03..0.037 rows=1 loops=1)

  • Buffers: shared hit=4
4. 0.015 0.497 ↓ 0.0 0 1

Unique (cost=18,574.63..19,201.56 rows=125,386 width=16) (actual time=0.49..0.497 rows=0 loops=1)

  • Buffers: shared hit=10
5. 0.019 0.482 ↓ 0.0 0 1

Sort (cost=18,574.63..18,888.09 rows=125,386 width=16) (actual time=0.474..0.482 rows=0 loops=1)

  • Sort Key: application_1.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=10
6. 0.015 0.463 ↓ 0.0 0 1

Nested Loop (cost=2,299.78..5,811.43 rows=125,386 width=16) (actual time=0.456..0.463 rows=0 loops=1)

  • Buffers: shared hit=10
7. 0.015 0.448 ↓ 0.0 0 1

Nested Loop (cost=2,299.36..2,320.67 rows=5 width=32) (actual time=0.441..0.448 rows=0 loops=1)

  • Buffers: shared hit=10
8. 0.014 0.433 ↓ 0.0 0 1

Aggregate (cost=2,299.08..2,299.13 rows=5 width=16) (actual time=0.426..0.433 rows=0 loops=1)

  • Buffers: shared hit=10
9. 0.016 0.419 ↓ 0.0 0 1

Append (cost=0.28..2,299.06 rows=5 width=16) (actual time=0.411..0.419 rows=0 loops=1)

  • Buffers: shared hit=10
10. 0.015 0.049 ↓ 0.0 0 1

Nested Loop (cost=0.28..6.68 rows=1 width=16) (actual time=0.042..0.049 rows=0 loops=1)

  • Buffers: shared hit=1
11. 0.015 0.034 ↓ 0.0 0 1

Nested Loop (cost=0..2.38 rows=1 width=16) (actual time=0.027..0.034 rows=0 loops=1)

  • Buffers: shared hit=1
12. 0.019 0.019 ↓ 0.0 0 1

Seq Scan on user_job_security_roles user_job_security_roles (cost=0..1.29 rows=1 width=32) (actual time=0.012..0.019 rows=0 loops=1)

  • Filter: (user_job_security_roles.user_id = '0f568568-d909-4f86-a3c2-1f5fdf19de92'::uuid)
  • Buffers: shared hit=1
13. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on security_role security_role (cost=0..1.04 rows=4 width=16) (never executed)

  • Filter: security_role.can_see_candidates
14. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (job_1.id = user_job_security_roles.job_id)
15. 0.015 0.216 ↓ 0.0 0 1

Nested Loop (cost=1.2..2,279.72 rows=3 width=16) (actual time=0.209..0.216 rows=0 loops=1)

  • Buffers: shared hit=5
16. 0.019 0.201 ↓ 0.0 0 1

Merge Join (cost=1.2..2,278.52 rows=3 width=32) (actual time=0.194..0.201 rows=0 loops=1)

  • Buffers: shared hit=5
17. 0.034 0.125 ↑ 27.0 1 1

Nested Loop (cost=0.14..30,743.31 rows=27 width=32) (actual time=0.118..0.125 rows=1 loops=1)

  • Buffers: shared hit=4
18. 0.023 0.023 ↑ 9.0 1 1

Index Scan using team_pkey on team team (cost=0.14..12.27 rows=9 width=86) (actual time=0.015..0.023 rows=1 loops=1)

  • Buffers: shared hit=2
19. 0.018 0.042 ↑ 3,019.0 1 1

Materialize (cost=0..103.28 rows=3,019 width=32) (actual time=0.036..0.042 rows=1 loops=1)

  • Buffers: shared hit=1
20. 0.024 0.024 ↑ 3,019.0 1 1

Seq Scan on job job_2 (cost=0..88.19 rows=3,019 width=32) (actual time=0.017..0.024 rows=1 loops=1)

  • Buffers: shared hit=1
21.          

SubPlan (for Nested Loop)

22. 0.026 0.026 ↑ 1.0 1 1

Seq Scan on team team_1 (cost=0..1.11 rows=1 width=70) (actual time=0.009..0.026 rows=1 loops=1)

  • Filter: (team_1.id = job_2.team_id)
  • Buffers: shared hit=1
23. 0.022 0.057 ↓ 0.0 0 1

Materialize (cost=1.06..1.07 rows=1 width=32) (actual time=0.049..0.057 rows=0 loops=1)

  • Buffers: shared hit=1
24. 0.020 0.035 ↓ 0.0 0 1

Sort (cost=1.06..1.06 rows=1 width=32) (actual time=0.028..0.035 rows=0 loops=1)

  • Sort Key: user_team_security_roles.team_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
25. 0.015 0.015 ↓ 0.0 0 1

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

  • Filter: (user_team_security_roles.user_id = '0f568568-d909-4f86-a3c2-1f5fdf19de92'::uuid)
  • Buffers: shared hit=1
26. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=0..1.06 rows=4 width=16) (never executed)

27. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on security_role security_role_1 (cost=0..1.04 rows=4 width=16) (never executed)

  • Filter: security_role_1.can_see_candidates
28. 0.015 0.138 ↓ 0.0 0 1

Result (cost=0.28..12.63 rows=1 width=16) (actual time=0.131..0.138 rows=0 loops=1)

  • Buffers: shared hit=4
29. 0.016 0.123 ↓ 0.0 0 1

SetOp (cost=0.28..12.62 rows=1 width=20) (actual time=0.116..0.123 rows=0 loops=1)

  • Buffers: shared hit=4
30. 0.014 0.107 ↓ 0.0 0 1

Append (cost=0.28..12.61 rows=2 width=20) (actual time=0.1..0.107 rows=0 loops=1)

  • Buffers: shared hit=4
31. 0.016 0.049 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=0.28..4.31 rows=1 width=20) (actual time=0.041..0.049 rows=0 loops=1)

  • Buffers: shared hit=2
32. 0.033 0.033 ↓ 0.0 0 1

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

  • Index Cond: (job_3.confidential = true)
  • Filter: job_3.confidential
  • Buffers: shared hit=2
33. 0.015 0.044 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=0.28..8.31 rows=1 width=20) (actual time=0.036..0.044 rows=0 loops=1)

  • Buffers: shared hit=2
34. 0.029 0.029 ↓ 0.0 0 1

Index Scan using job_author_id_idx on job job_4 (cost=0.28..8.3 rows=1 width=16) (actual time=0.021..0.029 rows=0 loops=1)

  • Index Cond: (job_4.author_id = '0f568568-d909-4f86-a3c2-1f5fdf19de92'::uuid)
  • Buffers: shared hit=2
35. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (job.id = job_1.id)
36. 0.000 0.000 ↓ 0.0 0 0

Index Scan using application_job_id_idx on application application_1 (cost=0.42..447.38 rows=25,077 width=32) (never executed)

  • Index Cond: (application_1.job_id = job.id)
Planning time : 2.777 ms
Execution time : 1.228 ms