explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IPOVS

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 8.459 ↓ 28.0 28 1

Limit (cost=71.27..87.70 rows=1 width=272) (actual time=8.391..8.459 rows=28 loops=1)

2. 0.028 8.457 ↓ 28.0 28 1

Result (cost=71.27..87.70 rows=1 width=272) (actual time=8.390..8.457 rows=28 loops=1)

3. 0.042 8.373 ↓ 28.0 28 1

Sort (cost=71.27..71.27 rows=1 width=264) (actual time=8.370..8.373 rows=28 loops=1)

  • Sort Key: window_results.release_date DESC
  • Sort Method: quicksort Memory: 33kB
4. 0.015 8.331 ↓ 28.0 28 1

Subquery Scan on window_results (cost=70.95..71.26 rows=1 width=264) (actual time=8.048..8.331 rows=28 loops=1)

  • Filter: (window_results.row_number = 1)
  • Rows Removed by Filter: 30
5. 0.286 8.316 ↓ 11.6 58 1

WindowAgg (cost=70.95..71.20 rows=5 width=308) (actual time=8.047..8.316 rows=58 loops=1)

6. 0.361 8.030 ↓ 11.6 58 1

Sort (cost=70.95..70.96 rows=5 width=330) (actual time=8.024..8.030 rows=58 loops=1)

  • Sort Key: (COALESCE(sp_tracks.isrc, (sp_tracks.id)::character varying(255))), sp_tracks.popularity DESC, sp_tracks.updated_at DESC
  • Sort Method: quicksort Memory: 44kB
7. 0.132 7.669 ↓ 11.6 58 1

Nested Loop Left Join (cost=2.68..70.89 rows=5 width=330) (actual time=0.187..7.669 rows=58 loops=1)

8. 0.122 3.245 ↓ 11.6 58 1

Nested Loop Left Join (cost=2.39..68.21 rows=5 width=278) (actual time=0.127..3.245 rows=58 loops=1)

9. 0.056 2.079 ↓ 11.6 58 1

Nested Loop Left Join (cost=2.11..66.71 rows=5 width=270) (actual time=0.095..2.079 rows=58 loops=1)

10. 0.085 1.057 ↓ 8.4 42 1

Nested Loop Left Join (cost=1.69..63.78 rows=5 width=232) (actual time=0.059..1.057 rows=42 loops=1)

11. 0.041 0.762 ↓ 8.4 42 1

Nested Loop Left Join (cost=1.27..61.18 rows=5 width=183) (actual time=0.048..0.762 rows=42 loops=1)

12. 0.100 0.469 ↓ 8.4 42 1

Nested Loop (cost=0.85..58.77 rows=5 width=179) (actual time=0.036..0.469 rows=42 loops=1)

13. 0.117 0.117 ↓ 8.4 42 1

Index Scan using index_sp_account_tracks_on_sp_account_id on sp_account_tracks (cost=0.42..16.57 rows=5 width=5) (actual time=0.022..0.117 rows=42 loops=1)

  • Index Cond: (sp_account_id = 612)
  • Filter: (NOT inactive)
14. 0.252 0.252 ↑ 1.0 1 42

Index Scan using sp_tracks_pkey on sp_tracks (cost=0.42..8.44 rows=1 width=178) (actual time=0.006..0.006 rows=1 loops=42)

  • Index Cond: (id = sp_account_tracks.sp_track_id)
15. 0.252 0.252 ↑ 1.0 1 42

Index Scan using index_sp_album_tracks_on_sp_track_id_unique on sp_album_tracks (cost=0.42..0.48 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=42)

  • Index Cond: (sp_track_id = sp_tracks.id)
16. 0.210 0.210 ↑ 1.0 1 42

Index Scan using sp_albums_pkey on sp_albums (cost=0.42..0.52 rows=1 width=57) (actual time=0.005..0.005 rows=1 loops=42)

  • Index Cond: (id = sp_album_tracks.sp_album_id)
17. 0.966 0.966 ↑ 4.0 1 42

Index Scan using index_it_songs_on_isrc on it_songs (cost=0.42..0.55 rows=4 width=51) (actual time=0.022..0.023 rows=1 loops=42)

  • Index Cond: ((isrc)::text = (sp_tracks.isrc)::text)
18. 1.044 1.044 ↓ 0.0 0 58

Index Scan using index_nielsen_songs_on_isrc on nielsen_songs (cost=0.28..0.30 rows=1 width=21) (actual time=0.018..0.018 rows=0 loops=58)

  • Index Cond: (isrc = (upper(replace((sp_tracks.isrc)::text, '-'::text, ''::text)))::citext)
19. 4.292 4.292 ↑ 1.0 1 58

Index Scan using matt on occ_discovery_listings (cost=0.29..0.52 rows=1 width=28) (actual time=0.074..0.074 rows=1 loops=58)

  • Index Cond: (sp_tracks.id = sp_track_id)
20.          

SubPlan (for Result)

21. 0.028 0.028 ↓ 0.0 0 28

Limit (cost=0.15..8.21 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=28)

22. 0.000 0.000 ↓ 0.0 0 28

Index Scan using ix_nielsen_song_metrics_on_song_id_week_year_metric_type_sorted on nielsen_song_metrics streaming_on_demand_totals (cost=0.15..8.21 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=28)

  • Index Cond: ((nielsen_song_id = window_results.nielsen_song_id) AND (metric_type = 3))
23. 0.028 0.028 ↓ 0.0 0 28

Limit (cost=0.15..8.21 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=28)

24. 0.000 0.000 ↓ 0.0 0 28

Index Scan using ix_nielsen_song_metrics_on_song_id_week_year_metric_type_sorted on nielsen_song_metrics ses_on_demand_totals (cost=0.15..8.21 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=28)

  • Index Cond: ((nielsen_song_id = window_results.nielsen_song_id) AND (metric_type = 0))
Planning time : 5.967 ms
Execution time : 8.773 ms