explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LABY

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.348 ↑ 1.0 1 1

Subquery Scan on window_results (cost=220.52..220.57 rows=1 width=153) (actual time=0.347..0.348 rows=1 loops=1)

  • Filter: (window_results.row_number <= 1)
2. 0.007 0.347 ↑ 1.0 1 1

WindowAgg (cost=220.52..220.56 rows=1 width=197) (actual time=0.346..0.347 rows=1 loops=1)

3. 0.012 0.340 ↑ 1.0 1 1

Sort (cost=220.52..220.53 rows=1 width=185) (actual time=0.339..0.340 rows=1 loops=1)

  • Sort Key: (COALESCE(it_songs.isrc, (it_songs.id)::character varying(255))), am_playlists.name, am_playlist_listings."position", am_playlist_listings.created_at
  • Sort Method: quicksort Memory: 25kB
4. 0.008 0.328 ↑ 1.0 1 1

WindowAgg (cost=220.48..220.51 rows=1 width=185) (actual time=0.327..0.328 rows=1 loops=1)

5. 0.009 0.320 ↑ 1.0 1 1

Sort (cost=220.48..220.48 rows=1 width=165) (actual time=0.320..0.320 rows=1 loops=1)

  • Sort Key: (COALESCE(it_songs.isrc, (it_songs.id)::character varying(255))), am_playlists.name, am_playlist_listings.created_at DESC
  • Sort Method: quicksort Memory: 25kB
6. 0.002 0.311 ↑ 1.0 1 1

Nested Loop (cost=5.51..220.47 rows=1 width=165) (actual time=0.132..0.311 rows=1 loops=1)

7. 0.002 0.302 ↑ 1.0 1 1

Nested Loop (cost=5.22..212.15 rows=1 width=129) (actual time=0.123..0.302 rows=1 loops=1)

8. 0.005 0.288 ↓ 3.0 3 1

Nested Loop (cost=5.07..211.82 rows=1 width=69) (actual time=0.091..0.288 rows=3 loops=1)

9. 0.033 0.268 ↓ 3.0 3 1

Nested Loop (cost=4.80..211.53 rows=1 width=69) (actual time=0.079..0.268 rows=3 loops=1)

10. 0.092 0.113 ↓ 5.1 61 1

Bitmap Heap Scan on it_songs (cost=4.51..51.46 rows=12 width=49) (actual time=0.034..0.113 rows=61 loops=1)

  • Recheck Cond: (it_account_id = 1)
  • Heap Blocks: exact=60
11. 0.021 0.021 ↓ 5.1 61 1

Bitmap Index Scan on index_it_songs_on_it_account_id (cost=0.00..4.51 rows=12 width=0) (actual time=0.021..0.021 rows=61 loops=1)

  • Index Cond: (it_account_id = 1)
12. 0.122 0.122 ↓ 0.0 0 61

Index Scan using index_am_playlist_listings_on_it_song_id on am_playlist_listings (cost=0.29..13.31 rows=3 width=24) (actual time=0.002..0.002 rows=0 loops=61)

  • Index Cond: (it_song_id = it_songs.id)
13. 0.015 0.015 ↑ 1.0 1 3

Index Scan using am_playlist_editions_pkey on am_playlist_editions (cost=0.27..0.29 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = am_playlist_listings.am_playlist_edition_id)
14. 0.012 0.012 ↓ 0.0 0 3

Index Scan using am_playlists_pkey on am_playlists (cost=0.14..0.32 rows=1 width=64) (actual time=0.004..0.004 rows=0 loops=3)

  • Index Cond: (id = am_playlist_editions.am_playlist_id)
  • Filter: ((name)::text ~~ 'Top 100: %'::text)
  • Rows Removed by Filter: 1
15. 0.007 0.007 ↑ 1.0 1 1

Index Scan using it_collections_pkey on it_collections (cost=0.29..8.31 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = it_songs.it_collection_id)
Planning time : 2.205 ms
Execution time : 0.566 ms