explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wZk7

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 0.526 ↑ 2.0 1 1

Nested Loop (cost=48.96..74.69 rows=2 width=1,307) (actual time=0.500..0.526 rows=1 loops=1)

  • Join Filter: (j.job_skill_id = jsk.job_skill_id)
  • Rows Removed by Join Filter: 14
2.          

CTE jw

3. 0.024 0.192 ↓ 3.0 3 1

Sort (cost=31.97..31.97 rows=1 width=183) (actual time=0.191..0.192 rows=3 loops=1)

  • Sort Key: jw.id
  • Sort Method: quicksort Memory: 25kB
4.          

Initplan (forSort)

5. 0.004 0.004 ↑ 1.0 1 1

Index Scan using job_id_uindex on job (cost=0.27..8.29 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=1)

  • Index Cond: (id = 1)
6. 0.008 0.164 ↓ 3.0 3 1

Nested Loop (cost=11.23..23.67 rows=1 width=183) (actual time=0.139..0.164 rows=3 loops=1)

  • Join Filter: (user_skill.skill_level_id = skill_lvl.id)
  • Rows Removed by Join Filter: 3
7. 0.002 0.150 ↓ 3.0 3 1

Nested Loop (cost=11.23..22.62 rows=1 width=183) (actual time=0.134..0.150 rows=3 loops=1)

  • Join Filter: (jw.user_id = u.id)
8. 0.016 0.136 ↓ 3.0 3 1

Hash Join (cost=10.96..17.88 rows=1 width=98) (actual time=0.128..0.136 rows=3 loops=1)

  • Hash Cond: (jw.user_id = user_skill.user_id)
9. 0.010 0.019 ↑ 1.0 3 1

Bitmap Heap Scan on job_worker jw (cost=4.30..11.14 rows=3 width=90) (actual time=0.013..0.019 rows=3 loops=1)

  • Recheck Cond: (job_id = 1)
  • Heap Blocks: exact=2
10. 0.009 0.009 ↑ 1.0 3 1

Bitmap Index Scan on job_worker_job_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.009..0.009 rows=3 loops=1)

  • Index Cond: (job_id = 1)
11. 0.025 0.101 ↓ 5.3 96 1

Hash (cost=6.44..6.44 rows=18 width=8) (actual time=0.101..0.101 rows=96 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
12. 0.076 0.076 ↓ 5.3 96 1

Seq Scan on user_job_category user_skill (cost=0.00..6.44 rows=18 width=8) (actual time=0.014..0.076 rows=96 loops=1)

  • Filter: (job_skill_id = $0)
  • Rows Removed by Filter: 198
13. 0.012 0.012 ↑ 1.0 1 3

Index Scan using user_pkey on users u (cost=0.27..4.73 rows=1 width=93) (actual time=0.003..0.004 rows=1 loops=3)

  • Index Cond: (id = user_skill.user_id)
14. 0.006 0.006 ↑ 1.0 2 3

Seq Scan on skill_level skill_lvl (cost=0.00..1.02 rows=2 width=8) (actual time=0.001..0.002 rows=2 loops=3)

15.          

Initplan (forNested Loop)

16. 0.039 0.254 ↑ 1.0 1 1

Aggregate (cost=0.02..0.03 rows=1 width=32) (actual time=0.254..0.254 rows=1 loops=1)

17. 0.215 0.215 ↓ 3.0 3 1

CTE Scan on jw jw_1 (cost=0.00..0.02 rows=1 width=24) (actual time=0.212..0.215 rows=3 loops=1)

18. 0.021 0.048 ↑ 1.0 1 1

Aggregate (cost=8.37..8.38 rows=1 width=32) (actual time=0.047..0.048 rows=1 loops=1)

19. 0.006 0.027 ↑ 1.0 2 1

Subquery Scan on tr (cost=8.33..8.36 rows=2 width=148) (actual time=0.024..0.027 rows=2 loops=1)

20. 0.004 0.021 ↑ 1.0 2 1

Group (cost=8.33..8.34 rows=2 width=124) (actual time=0.019..0.021 rows=2 loops=1)

  • Group Key: tr_1.id
21. 0.010 0.017 ↑ 1.0 2 1

Sort (cost=8.33..8.33 rows=2 width=124) (actual time=0.017..0.017 rows=2 loops=1)

  • Sort Key: tr_1.id
  • Sort Method: quicksort Memory: 25kB
22. 0.007 0.007 ↑ 1.0 2 1

Index Scan using job_transaction_job_id_index on job_transaction tr_1 (cost=0.15..8.32 rows=2 width=124) (actual time=0.007..0.007 rows=2 loops=1)

  • Index Cond: (job_id = 1)
23. 0.004 0.139 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.58..24.13 rows=1 width=1,556) (actual time=0.125..0.139 rows=1 loops=1)

  • Join Filter: (dress.id = j.dress_code_id)
  • Rows Removed by Join Filter: 5
24. 0.002 0.129 ↑ 1.0 1 1

Nested Loop (cost=8.58..23.04 rows=1 width=1,464) (actual time=0.115..0.129 rows=1 loops=1)

  • Join Filter: (j.skill_level_id = skl.skill_level_id)
  • Rows Removed by Join Filter: 1
25. 0.008 0.117 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.58..21.96 rows=1 width=1,455) (actual time=0.105..0.117 rows=1 loops=1)

  • Join Filter: (sk.id = j.job_skill_id)
  • Rows Removed by Join Filter: 14
26. 0.004 0.102 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.58..20.60 rows=1 width=1,400) (actual time=0.098..0.102 rows=1 loops=1)

27. 0.032 0.094 ↑ 1.0 1 1

Hash Right Join (cost=8.30..12.30 rows=1 width=1,213) (actual time=0.091..0.094 rows=1 loops=1)

  • Hash Cond: (e.id = j.event_id)
28. 0.044 0.044 ↓ 1.1 79 1

Seq Scan on event e (cost=0.00..3.72 rows=72 width=236) (actual time=0.005..0.044 rows=79 loops=1)

29. 0.006 0.018 ↑ 1.0 1 1

Hash (cost=8.29..8.29 rows=1 width=981) (actual time=0.018..0.018 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.012 0.012 ↑ 1.0 1 1

Index Scan using job_id_uindex on job j (cost=0.27..8.29 rows=1 width=981) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (id = 1)
31. 0.004 0.004 ↑ 1.0 1 1

Index Scan using user_pkey on users employer (cost=0.27..8.29 rows=1 width=191) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = j.user_id)
32. 0.007 0.007 ↑ 1.1 15 1

Seq Scan on job_skill sk (cost=0.00..1.16 rows=16 width=59) (actual time=0.002..0.007 rows=15 loops=1)

33. 0.010 0.010 ↑ 1.0 2 1

Seq Scan on skill_level_label skl (cost=0.00..1.05 rows=2 width=13) (actual time=0.008..0.010 rows=2 loops=1)

  • Filter: (language_id = 1)
  • Rows Removed by Filter: 2
34. 0.006 0.006 ↓ 1.2 5 1

Seq Scan on dress_code dress (cost=0.00..1.04 rows=4 width=96) (actual time=0.004..0.006 rows=5 loops=1)

35. 0.012 0.012 ↑ 2.1 15 1

Seq Scan on job_skill_label jsk (cost=0.00..2.80 rows=32 width=14) (actual time=0.005..0.012 rows=15 loops=1)

  • Filter: (language_id = 1)
  • Rows Removed by Filter: 15
36.          

SubPlan (forNested Loop)

37. 0.003 0.026 ↑ 1.0 1 1

Aggregate (cost=3.47..3.48 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=1)

38. 0.000 0.023 ↓ 0.0 0 1

Subquery Scan on etr (cost=3.43..3.46 rows=2 width=148) (actual time=0.023..0.023 rows=0 loops=1)

39. 0.001 0.023 ↓ 0.0 0 1

Group (cost=3.43..3.44 rows=2 width=124) (actual time=0.023..0.023 rows=0 loops=1)

  • Group Key: etr_1.id
40. 0.006 0.022 ↓ 0.0 0 1

Sort (cost=3.43..3.44 rows=2 width=124) (actual time=0.022..0.022 rows=0 loops=1)

  • Sort Key: etr_1.id
  • Sort Method: quicksort Memory: 25kB
41. 0.016 0.016 ↓ 0.0 0 1

Seq Scan on event_transaction etr_1 (cost=0.00..3.42 rows=2 width=124) (actual time=0.016..0.016 rows=0 loops=1)

  • Filter: (event_id = j.event_id)
  • Rows Removed by Filter: 49