explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bax

Settings
# exclusive inclusive rows x rows loops node
1. 6.582 59.859 ↓ 2.3 3,957 1

Nested Loop Left Join (cost=9,515.11..12,981.62 rows=1,748 width=16,455) (actual time=17.135..59.859 rows=3,957 loops=1)

  • Buffers: shared hit=19,313
2. 5.434 41.406 ↓ 2.3 3,957 1

Nested Loop Left Join (cost=9,514.68..12,142.62 rows=1,748 width=16,325) (actual time=17.114..41.406 rows=3,957 loops=1)

  • Buffers: shared hit=3,509
3. 0.066 32.722 ↑ 8.3 25 1

Nested Loop Left Join (cost=9,514.26..11,816.78 rows=208 width=9,723) (actual time=17.095..32.722 rows=25 loops=1)

  • Buffers: shared hit=2,861
4. 0.044 32.560 ↑ 17.3 12 1

Nested Loop Left Join (cost=9,513.84..11,648.33 rows=208 width=9,593) (actual time=17.079..32.560 rows=12 loops=1)

  • Buffers: shared hit=2,819
5. 0.037 32.444 ↑ 19.2 9 1

Nested Loop Left Join (cost=9,513.55..11,548.35 rows=173 width=8,113) (actual time=17.061..32.444 rows=9 loops=1)

  • Buffers: shared hit=2,789
6. 0.042 32.326 ↑ 19.2 9 1

Nested Loop Left Join (cost=9,513.12..11,271.80 rows=173 width=7,081) (actual time=17.041..32.326 rows=9 loops=1)

  • Buffers: shared hit=2,753
7. 0.042 32.239 ↑ 19.2 9 1

Nested Loop Left Join (cost=9,512.84..11,217.19 rows=173 width=6,929) (actual time=17.025..32.239 rows=9 loops=1)

  • Buffers: shared hit=2,726
8. 0.054 32.143 ↑ 19.2 9 1

Nested Loop Left Join (cost=9,512.55..11,163.36 rows=173 width=6,826) (actual time=17.007..32.143 rows=9 loops=1)

  • Buffers: shared hit=2,699
9. 0.035 31.999 ↑ 19.2 9 1

Nested Loop Left Join (cost=9,512.12..11,070.77 rows=173 width=6,570) (actual time=16.986..31.999 rows=9 loops=1)

  • Buffers: shared hit=2,663
10. 0.035 31.847 ↑ 16.6 9 1

Nested Loop Left Join (cost=9,511.69..10,774.01 rows=149 width=5,949) (actual time=16.969..31.847 rows=9 loops=1)

  • Buffers: shared hit=2,627
11. 0.016 31.722 ↑ 16.6 9 1

Nested Loop (cost=9,511.27..10,597.62 rows=149 width=5,689) (actual time=16.952..31.722 rows=9 loops=1)

  • Buffers: shared hit=2,591
12. 0.028 0.028 ↑ 1.0 1 1

Index Scan using institution_pkey on institution i (cost=0.28..2.50 rows=1 width=4,120) (actual time=0.023..0.028 rows=1 loops=1)

  • Index Cond: (id = 35)
  • Buffers: shared hit=3
13. 0.021 31.678 ↑ 16.6 9 1

Nested Loop Left Join (cost=9,510.99..10,593.64 rows=149 width=1,569) (actual time=16.925..31.678 rows=9 loops=1)

  • Buffers: shared hit=2,588
14. 0.045 31.612 ↑ 16.6 9 1

Nested Loop (cost=9,510.70..10,538.07 rows=149 width=977) (actual time=16.916..31.612 rows=9 loops=1)

  • Buffers: shared hit=2,570
15. 9.677 31.423 ↑ 11.3 18 1

Hash Join (cost=9,510.41..10,461.50 rows=204 width=715) (actual time=16.896..31.423 rows=18 loops=1)

  • Hash Cond: (wj.journal_id = j.id)
  • Buffers: shared hit=2,516
16. 5.290 5.290 ↓ 1.0 31,071 1

Seq Scan on wp_journal wj (cost=0.00..869.56 rows=31,056 width=594) (actual time=0.012..5.290 rows=31,071 loops=1)

  • Buffers: shared hit=559
17. 5.325 16.456 ↓ 1.1 10,666 1

Hash (cost=9,386.86..9,386.86 rows=9,884 width=121) (actual time=16.455..16.456 rows=10,666 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,637kB
  • Buffers: shared hit=1,957
18. 10.296 11.131 ↓ 1.1 10,666 1

Bitmap Heap Scan on journal j (cost=114.43..9,386.86 rows=9,884 width=121) (actual time=1.112..11.131 rows=10,666 loops=1)

  • Recheck Cond: (institution_id = 35)
  • Heap Blocks: exact=1,805
  • Buffers: shared hit=1,957
19. 0.835 0.835 ↓ 1.1 11,007 1

Bitmap Index Scan on i_journal_institution (cost=0.00..111.96 rows=9,884 width=0) (actual time=0.835..0.835 rows=11,007 loops=1)

  • Index Cond: (institution_id = 35)
  • Buffers: shared hit=46
20. 0.144 0.144 ↓ 0.0 0 18

Index Scan using wp_pkey on wp w (cost=0.29..0.38 rows=1 width=262) (actual time=0.008..0.008 rows=0 loops=18)

  • Index Cond: (id = wj.wp_id)
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=54
21. 0.045 0.045 ↓ 0.0 0 9

Index Scan using idx_wp_access_wp_id on wp_access wa (cost=0.29..0.35 rows=2 width=592) (actual time=0.005..0.005 rows=0 loops=9)

  • Index Cond: (wp_id = w.id)
  • Buffers: shared hit=18
22. 0.090 0.090 ↑ 1.0 1 9

Index Scan using course_pkey on course c (cost=0.42..1.18 rows=1 width=260) (actual time=0.010..0.010 rows=1 loops=9)

  • Index Cond: (id = j.course_id)
  • Buffers: shared hit=36
23. 0.117 0.117 ↑ 2.0 1 9

Index Scan using i_jrnlteacherrel_journal on journal_teacher_rel jtr (cost=0.43..1.97 rows=2 width=621) (actual time=0.012..0.013 rows=1 loops=9)

  • Index Cond: (journal_id = j.id)
  • Buffers: shared hit=36
24. 0.090 0.090 ↑ 1.0 1 9

Index Scan using role_pkey on role r (cost=0.43..0.54 rows=1 width=256) (actual time=0.010..0.010 rows=1 loops=9)

  • Index Cond: (id = jtr.teacher_id)
  • Buffers: shared hit=36
25. 0.054 0.054 ↑ 1.0 1 9

Index Scan using subject_type_pkey on subject_type st (cost=0.29..0.31 rows=1 width=103) (actual time=0.006..0.006 rows=1 loops=9)

  • Index Cond: (id = c.subject_type_id)
  • Buffers: shared hit=27
26. 0.045 0.045 ↑ 1.0 1 9

Index Scan using study_year_pkey on study_year sy (cost=0.28..0.32 rows=1 width=152) (actual time=0.005..0.005 rows=1 loops=9)

  • Index Cond: (id = j.study_year_id)
  • Buffers: shared hit=27
27. 0.081 0.081 ↑ 1.0 1 9

Index Scan using person_pkey on person p (cost=0.43..1.60 rows=1 width=1,032) (actual time=0.009..0.009 rows=1 loops=9)

  • Index Cond: (id = w.owner_id)
  • Buffers: shared hit=36
28. 0.072 0.072 ↑ 6.0 1 9

Index Scan using idx_wp_block_wp_id on wp_block wb (cost=0.29..0.52 rows=6 width=1,480) (actual time=0.006..0.008 rows=1 loops=9)

  • Index Cond: (wp_id = w.id)
  • Buffers: shared hit=30
29. 0.096 0.096 ↑ 2.5 2 12

Index Scan using idx_wp_todo_wp_block_id on wp_todo wt2 (cost=0.42..0.76 rows=5 width=130) (actual time=0.006..0.008 rows=2 loops=12)

  • Index Cond: (wp_block_id = wb.id)
  • Buffers: shared hit=42
30. 3.250 3.250 ↓ 6.3 158 25

Index Scan using idx_wp_lesson_block_id on wp_lesson wl (cost=0.42..1.32 rows=25 width=6,602) (actual time=0.009..0.130 rows=158 loops=25)

  • Index Cond: (wp_block_id = wb.id)
  • Buffers: shared hit=648
31. 11.871 11.871 ↑ 1.0 1 3,957

Index Scan using idx_wp_todo_wp_lesson_id on wp_todo wt (cost=0.42..0.47 rows=1 width=130) (actual time=0.003..0.003 rows=1 loops=3,957)

  • Index Cond: (wp_lesson_id = wl.id)
  • Buffers: shared hit=15,804
Planning time : 9.723 ms