explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JNu7

Settings
# exclusive inclusive rows x rows loops node
1. 0.193 19.276 ↑ 1.1 104 1

Hash Join (cost=79.03..2,462.86 rows=118 width=197) (actual time=1.44..19.276 rows=104 loops=1)

  • Buffers: shared hit=1096
2.          

Initplan (for Hash Join)

3. 0.007 0.099 ↑ 1.0 1 1

Aggregate (cost=22.29..22.3 rows=1 width=32) (actual time=0.098..0.099 rows=1 loops=1)

  • Buffers: shared hit=4
4. 0.004 0.092 ↑ 1.0 3 1

Limit (cost=0.28..22.25 rows=3 width=32) (actual time=0.065..0.092 rows=3 loops=1)

  • Buffers: shared hit=4
5. 0.027 0.088 ↑ 5.3 3 1

Nested Loop (cost=0.28..117.43 rows=16 width=32) (actual time=0.064..0.088 rows=3 loops=1)

  • Buffers: shared hit=4
6. 0.007 0.007 ↑ 32.5 6 1

Seq Scan on authors a (cost=0..40.95 rows=195 width=552) (actual time=0.004..0.007 rows=6 loops=1)

  • Buffers: shared hit=1
7. 0.038 0.054 ↑ 1.8 9 6

Materialize (cost=0.28..29.64 rows=16 width=4) (actual time=0.005..0.009 rows=9 loops=6)

  • Buffers: shared hit=3
8. 0.016 0.016 ↑ 1.0 16 1

Index Only Scan using books2authors_pkey on books2authors b2a (cost=0.28..29.56 rows=16 width=4) (actual time=0.008..0.016 rows=16 loops=1)

  • Index Cond: (b2a.id_book = 27)
  • Heap Fetches: 16
  • Buffers: shared hit=3
9. 0.138 0.783 ↑ 1.1 104 1

Nested Loop (cost=43.58..747.99 rows=118 width=105) (actual time=0.172..0.783 rows=104 loops=1)

  • Buffers: shared hit=458
10. 0.108 0.216 ↑ 1.0 143 1

Sort (cost=43.3..43.66 rows=143 width=4) (actual time=0.165..0.216 rows=143 loops=1)

  • Sort Key: g2b2.id_book
  • Sort Method: quicksort Memory: 31kB
  • Buffers: shared hit=29
11. 0.095 0.108 ↑ 1.0 143 1

Bitmap Heap Scan on genres2books g2b2 (cost=5.39..38.18 rows=143 width=4) (actual time=0.021..0.108 rows=143 loops=1)

  • Heap Blocks: exact=26
  • Buffers: shared hit=29
12. 0.013 0.013 ↑ 1.0 143 1

Bitmap Index Scan on genres_index (cost=0..5.35 rows=143 width=0) (actual time=0.013..0.013 rows=143 loops=1)

  • Index Cond: (g2b2.id_genre = 196)
  • Buffers: shared hit=3
13. 0.429 0.429 ↑ 1.0 1 143

Index Scan using books_pkey on books b (cost=0.28..4.92 rows=1 width=105) (actual time=0.003..0.003 rows=1 loops=143)

  • Index Cond: (b.id_book = g2b2.id_book)
  • Filter: (NOT b.deleted)
  • Buffers: shared hit=429
14. 0.477 0.937 ↓ 7.2 1,007 1

Hash (cost=11.4..11.4 rows=140 width=36) (actual time=0.936..0.937 rows=1,007 loops=1)

  • Buffers: shared hit=9
15. 0.460 0.460 ↓ 7.2 1,007 1

Seq Scan on series s (cost=0..11.4 rows=140 width=36) (actual time=0.007..0.46 rows=1,007 loops=1)

  • Buffers: shared hit=9
16.          

SubPlan (for Hash Join)

17. 0.416 17.264 ↑ 1.0 1 104

Aggregate (cost=14.22..14.23 rows=1 width=32) (actual time=0.165..0.166 rows=1 loops=104)

  • Buffers: shared hit=625
18. 8.528 16.848 ↑ 1.0 1 104

Hash Join (cost=8.31..14.21 rows=1 width=38) (actual time=0.14..0.162 rows=1 loops=104)

  • Buffers: shared hit=625
19. 7.904 7.904 ↑ 1.0 229 104

Seq Scan on genres g (cost=0..5.29 rows=229 width=42) (actual time=0.002..0.076 rows=229 loops=104)

  • Buffers: shared hit=312
20. 0.104 0.416 ↑ 1.0 1 104

Hash (cost=8.3..8.3 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=104)

  • Buffers: shared hit=313
21. 0.312 0.312 ↑ 1.0 1 104

Index Only Scan using genres2books_pkey on genres2books g2b (cost=0.28..8.3 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=104)

  • Index Cond: (g2b.id_book = b.id_book)
  • Heap Fetches: 119
  • Buffers: shared hit=313
Planning time : 0.515 ms
Execution time : 19.394 ms