explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hueA

Settings
# exclusive inclusive rows x rows loops node
1. 0.272 17.456 ↑ 1.1 104 1

Hash Left Join (cost=79.03..2,462.86 rows=118 width=681) (actual time=1.183..17.456 rows=104 loops=1)

  • Hash Cond: (b.series_id_series = s.id_series)
2.          

Initplan (for Hash Left Join)

3. 0.005 0.077 ↑ 1.0 1 1

Aggregate (cost=22.29..22.30 rows=1 width=32) (actual time=0.076..0.077 rows=1 loops=1)

4. 0.005 0.072 ↑ 1.0 3 1

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

5. 0.020 0.067 ↑ 5.3 3 1

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

  • Join Filter: (a.id_author = b2a.id_author)
  • Rows Removed by Join Filter: 51
6. 0.005 0.005 ↑ 32.5 6 1

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

7. 0.025 0.042 ↑ 1.8 9 6

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

8. 0.017 0.017 ↑ 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.009..0.017 rows=16 loops=1)

  • Index Cond: (id_book = 27)
  • Heap Fetches: 16
9. 0.109 0.735 ↑ 1.1 104 1

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

10. 0.098 0.197 ↑ 1.0 143 1

Sort (cost=43.30..43.66 rows=143 width=4) (actual time=0.150..0.197 rows=143 loops=1)

  • Sort Key: g2b2.id_book
  • Sort Method: quicksort Memory: 31kB
11. 0.085 0.099 ↑ 1.0 143 1

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

  • Recheck Cond: (id_genre = 196)
  • Heap Blocks: exact=26
12. 0.014 0.014 ↑ 1.0 143 1

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

  • Index Cond: (id_genre = 196)
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: (id_book = g2b2.id_book)
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 0
14. 0.404 0.772 ↓ 7.2 1,007 1

Hash (cost=11.40..11.40 rows=140 width=520) (actual time=0.771..0.772 rows=1,007 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 78kB
15. 0.368 0.368 ↓ 7.2 1,007 1

Seq Scan on series s (cost=0.00..11.40 rows=140 width=520) (actual time=0.005..0.368 rows=1,007 loops=1)

16.          

SubPlan (for Hash Left Join)

17. 0.208 15.600 ↑ 1.0 1 104

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

18. 7.696 15.392 ↑ 1.0 1 104

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

  • Hash Cond: (g.id_genre = g2b.id_genre)
19. 7.280 7.280 ↑ 1.0 229 104

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

20. 0.104 0.416 ↑ 1.0 1 104

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.312 0.312 ↑ 1.0 1 104

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

  • Index Cond: (id_book = b.id_book)
  • Heap Fetches: 119
Planning time : 0.441 ms
Execution time : 17.563 ms