explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9DoN

Settings
# exclusive inclusive rows x rows loops node
1. 87.103 49,239.295 ↑ 1.5 2,085 1

Subquery Scan on window_results (cost=1,690,781.38..1,691,206.31 rows=3,148 width=404) (actual time=48,146.354..49,239.295 rows=2,085 loops=1)

  • Filter: (window_results.row_number <= 1)
  • Rows Removed by Filter: 225607
2. 530.958 49,152.192 ↓ 24.1 227,692 1

WindowAgg (cost=1,690,781.38..1,691,088.28 rows=9,443 width=412) (actual time=48,146.350..49,152.192 rows=227,692 loops=1)

3. 1,643.244 48,621.234 ↓ 24.1 227,692 1

Sort (cost=1,690,781.38..1,690,804.99 rows=9,443 width=384) (actual time=48,146.331..48,621.234 rows=227,692 loops=1)

  • Sort Key: it_songs.name, am_playlists.id, am_playlist_listings.created_at DESC
  • Sort Method: external merge Disk: 69944kB
4. 356.846 46,977.990 ↓ 24.1 227,692 1

Nested Loop Left Join (cost=1,001.57..1,690,157.90 rows=9,443 width=384) (actual time=65.489..46,977.990 rows=227,692 loops=1)

5. 6,425.235 46,165.760 ↓ 24.1 227,692 1

Gather (cost=1,001.30..1,687,277.32 rows=9,443 width=303) (actual time=65.125..46,165.760 rows=227,692 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
6. 275.787 39,740.525 ↓ 21.1 28,462 8

Nested Loop (cost=1.30..1,685,333.02 rows=1,349 width=303) (actual time=69.651..39,740.525 rows=28,462 loops=8)

7. 5,353.789 39,464.731 ↓ 21.1 28,462 8

Nested Loop (cost=1.01..1,684,902.80 rows=1,349 width=122) (actual time=69.045..39,464.731 rows=28,462 loops=8)

8. 32,514.225 34,110.756 ↓ 21.1 28,462 8

Nested Loop (cost=0.57..1,684,274.31 rows=1,349 width=117) (actual time=68.401..34,110.756 rows=28,462 loops=8)

9. 446.794 446.794 ↓ 1.0 29 8

Parallel Seq Scan on it_songs (cost=0.00..1,138,912.14 rows=28 width=101) (actual time=42.445..446.794 rows=29 loops=8)

  • Filter: (it_account_id = 469)
  • Rows Removed by Filter: 1055209
10. 1,149.737 1,149.737 ↑ 6.4 973 234

Index Scan using index_am_playlist_listings_on_it_song_id on am_playlist_listings (cost=0.57..19,415.36 rows=6,186 width=20) (actual time=2.674..1,149.737 rows=973 loops=234)

  • Index Cond: (it_song_id = it_songs.id)
11. 0.186 0.186 ↑ 1.0 1 227,692

Index Scan using am_playlist_editions_pkey on am_playlist_editions (cost=0.43..0.46 rows=1 width=13) (actual time=0.184..0.186 rows=1 loops=227,692)

  • Index Cond: (id = am_playlist_listings.am_playlist_edition_id)
12. 0.007 0.007 ↑ 1.0 1 227,692

Index Scan using am_playlists_pkey on am_playlists (cost=0.29..0.31 rows=1 width=185) (actual time=0.007..0.007 rows=1 loops=227,692)

  • Index Cond: (id = am_playlist_editions.am_playlist_id)
13. 455.384 455.384 ↑ 1.0 1 227,692

Index Scan using am_curators_pkey on am_curators (cost=0.28..0.30 rows=1 width=89) (actual time=0.002..0.002 rows=1 loops=227,692)

  • Index Cond: (id = am_playlists.am_curator_id)
Planning time : 9.782 ms
Execution time : 49,256.312 ms