explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JIcs : 1

Settings
# exclusive inclusive rows x rows loops node
1. 1.064 23.704 ↑ 1.0 1 1

GroupAggregate (cost=682.22..717.56 rows=1 width=266) (actual time=22.594..23.704 rows=1 loops=1)

  • Group Key: g."Name
  • Filter: (count(DISTINCT a."ArtistId") = $0)
  • Rows Removed by Filter: 24
2.          

Initplan (forGroupAggregate)

3. 0.014 7.759 ↑ 1.0 1 1

Aggregate (cost=354.52..354.53 rows=1 width=8) (actual time=7.759..7.759 rows=1 loops=1)

4. 1.103 7.745 ↑ 1.0 25 1

GroupAggregate (cost=327.69..354.21 rows=25 width=266) (actual time=6.372..7.745 rows=25 loops=1)

  • Group Key: g_1."Name
5. 2.097 6.642 ↑ 1.0 3,503 1

Sort (cost=327.69..336.45 rows=3,503 width=262) (actual time=6.320..6.642 rows=3,503 loops=1)

  • Sort Key: g_1."Name
  • Sort Method: quicksort Memory: 274kB
6. 1.477 4.545 ↑ 1.0 3,503 1

Hash Join (cost=12.37..121.46 rows=3,503 width=262) (actual time=0.311..4.545 rows=3,503 loops=1)

  • Hash Cond: (t_1."AlbumId" = a_1."AlbumId")
7. 1.872 2.830 ↑ 1.0 3,503 1

Hash Join (cost=1.56..101.35 rows=3,503 width=262) (actual time=0.052..2.830 rows=3,503 loops=1)

  • Hash Cond: (t_1."GenreId" = g_1."GenreId")
8. 0.930 0.930 ↑ 1.0 3,503 1

Seq Scan on "Track" t_1 (cost=0.00..89.03 rows=3,503 width=8) (actual time=0.013..0.930 rows=3,503 loops=1)

9. 0.012 0.028 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=262) (actual time=0.028..0.028 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
10. 0.016 0.016 ↑ 1.0 25 1

Seq Scan on "Genre" g_1 (cost=0.00..1.25 rows=25 width=262) (actual time=0.008..0.016 rows=25 loops=1)

11. 0.124 0.238 ↑ 1.0 347 1

Hash (cost=6.47..6.47 rows=347 width=8) (actual time=0.238..0.238 rows=347 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
12. 0.114 0.114 ↑ 1.0 347 1

Seq Scan on "Album" a_1 (cost=0.00..6.47 rows=347 width=8) (actual time=0.008..0.114 rows=347 loops=1)

13. 3.490 14.881 ↑ 1.0 3,503 1

Sort (cost=327.69..336.45 rows=3,503 width=262) (actual time=14.547..14.881 rows=3,503 loops=1)

  • Sort Key: g."Name
  • Sort Method: quicksort Memory: 274kB
14. 3.709 11.391 ↑ 1.0 3,503 1

Hash Join (cost=12.37..121.46 rows=3,503 width=262) (actual time=0.928..11.391 rows=3,503 loops=1)

  • Hash Cond: (t."AlbumId" = a."AlbumId")
15. 4.853 6.975 ↑ 1.0 3,503 1

Hash Join (cost=1.56..101.35 rows=3,503 width=262) (actual time=0.198..6.975 rows=3,503 loops=1)

  • Hash Cond: (t."GenreId" = g."GenreId")
16. 2.021 2.021 ↑ 1.0 3,503 1

Seq Scan on "Track" t (cost=0.00..89.03 rows=3,503 width=8) (actual time=0.059..2.021 rows=3,503 loops=1)

17. 0.045 0.101 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=262) (actual time=0.101..0.101 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
18. 0.056 0.056 ↑ 1.0 25 1

Seq Scan on "Genre" g (cost=0.00..1.25 rows=25 width=262) (actual time=0.034..0.056 rows=25 loops=1)

19. 0.346 0.707 ↑ 1.0 347 1

Hash (cost=6.47..6.47 rows=347 width=8) (actual time=0.707..0.707 rows=347 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
20. 0.361 0.361 ↑ 1.0 347 1

Seq Scan on "Album" a (cost=0.00..6.47 rows=347 width=8) (actual time=0.020..0.361 rows=347 loops=1)

Planning time : 2.892 ms
Execution time : 24.130 ms