explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8b4I

Settings
# exclusive inclusive rows x rows loops node
1. 1.256 48,225.825 ↑ 2.0 118 1

Subquery Scan on window_results (cost=673,162.37..673,196.47 rows=239 width=152) (actual time=48,217.301..48,225.825 rows=118 loops=1)

  • Filter: (window_results.row_number <= 1)
  • Rows Removed by Filter: 4906
2. 5.614 48,224.569 ↓ 7.0 5,024 1

WindowAgg (cost=673,162.37..673,187.50 rows=718 width=160) (actual time=48,217.295..48,224.569 rows=5,024 loops=1)

3. 14.607 48,218.955 ↓ 7.0 5,024 1

Sort (cost=673,162.37..673,164.16 rows=718 width=132) (actual time=48,217.276..48,218.955 rows=5,024 loops=1)

  • Sort Key: sc_chart_listings.genre, sc_chart_listings.chart_type, sc_chart_listings.country, sc_songs.id, sc_chart_listings.created_at DESC
  • Sort Method: quicksort Memory: 1226kB
4. 7.200 48,204.348 ↓ 7.0 5,024 1

Gather (cost=3,244.69..673,128.31 rows=718 width=132) (actual time=43.219..48,204.348 rows=5,024 loops=1)

  • Workers Planned: 6
  • Workers Launched: 0
5. 20,434.692 48,197.148 ↓ 41.9 5,024 1

Hash Join (cost=2,244.69..672,056.51 rows=120 width=132) (actual time=42.725..48,197.148 rows=5,024 loops=1)

  • Hash Cond: (sc_chart_listings.sc_song_id = sc_songs.id)
6. 27,724.761 27,724.761 ↓ 6.0 57,549,410 1

Parallel Seq Scan on sc_chart_listings (cost=0.00..633,842.36 rows=9,591,536 width=36) (actual time=0.826..27,724.761 rows=57,549,410 loops=1)

7. 0.118 37.695 ↑ 7.6 73 1

Hash (cost=2,237.73..2,237.73 rows=557 width=100) (actual time=37.695..37.695 rows=73 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
8. 37.577 37.577 ↑ 7.6 73 1

Index Scan using index_sc_songs_on_sc_account_id on sc_songs (cost=0.56..2,237.73 rows=557 width=100) (actual time=2.767..37.577 rows=73 loops=1)

  • Index Cond: (sc_account_id = 7675)
Planning time : 19.316 ms
Execution time : 48,226.219 ms