explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nZNI

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 0.376 ↓ 3.0 3 1

Hash Right Join (cost=25.24..28.34 rows=1 width=185) (actual time=0.348..0.376 rows=3 loops=1)

  • Hash Cond: ((it_chart_latest_editions.genre = window_results.genre) AND (it_chart_latest_editions.country_code = window_results.country_code) AND (it_chart_latest_editions.chart_type = window_results.chart_type))
2. 0.032 0.032 ↓ 1.2 62 1

Seq Scan on it_chart_latest_editions (cost=0.00..2.51 rows=51 width=20) (actual time=0.019..0.032 rows=62 loops=1)

3. 0.019 0.274 ↓ 3.0 3 1

Hash (cost=25.22..25.22 rows=1 width=184) (actual time=0.274..0.274 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
4. 0.002 0.255 ↓ 3.0 3 1

Subquery Scan on window_results (cost=25.17..25.22 rows=1 width=184) (actual time=0.245..0.255 rows=3 loops=1)

  • Filter: (window_results.row_number <= 1)
5. 0.040 0.253 ↓ 3.0 3 1

WindowAgg (cost=25.17..25.21 rows=1 width=192) (actual time=0.244..0.253 rows=3 loops=1)

6. 0.063 0.213 ↓ 3.0 3 1

Sort (cost=25.17..25.18 rows=1 width=132) (actual time=0.213..0.213 rows=3 loops=1)

  • Sort Key: it_chart_listings.genre, it_chart_listings.chart_type, it_chart_listings.country_code, it_songs.id, it_chart_listings.created_at DESC
  • Sort Method: quicksort Memory: 25kB
7. 0.003 0.150 ↓ 3.0 3 1

Nested Loop (cost=0.70..25.16 rows=1 width=132) (actual time=0.106..0.150 rows=3 loops=1)

8. 0.113 0.113 ↓ 2.0 2 1

Index Scan using index_it_songs_on_it_id_unique on it_songs (cost=0.42..16.85 rows=1 width=104) (actual time=0.085..0.113 rows=2 loops=1)

  • Index Cond: (it_id = ANY ('{1206540519,1443068417}'::integer[]))
  • Filter: (it_account_id = 706)
9. 0.034 0.034 ↓ 2.0 2 2

Index Scan using index_it_chart_listings_on_it_song_id on it_chart_listings (cost=0.29..8.30 rows=1 width=32) (actual time=0.015..0.017 rows=2 loops=2)

  • Index Cond: (it_song_id = it_songs.id)
Planning time : 6.096 ms
Execution time : 0.697 ms