explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tmov

Settings
# exclusive inclusive rows x rows loops node
1. 1.213 9,172.119 ↑ 2.0 117 1

Subquery Scan on window_results (cost=697,011.21..697,045.17 rows=238 width=152) (actual time=9,163.567..9,172.119 rows=117 loops=1)

  • Filter: (window_results.row_number <= 1)
  • Rows Removed by Filter: 4906
2. 5.627 9,170.906 ↓ 7.0 5,023 1

WindowAgg (cost=697,011.21..697,036.23 rows=715 width=160) (actual time=9,163.560..9,170.906 rows=5,023 loops=1)

3. 10.867 9,165.279 ↓ 7.0 5,023 1

Sort (cost=697,011.21..697,013.00 rows=715 width=132) (actual time=9,163.536..9,165.279 rows=5,023 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: 1225kB
4. 2.128 9,154.412 ↓ 7.0 5,023 1

Gather (cost=3,244.69..696,977.31 rows=715 width=132) (actual time=24.174..9,154.412 rows=5,023 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
5. 4,064.592 9,152.284 ↓ 6.0 718 7

Hash Join (cost=2,244.69..695,905.81 rows=119 width=132) (actual time=9.290..9,152.284 rows=718 loops=7)

  • Hash Cond: (sc_chart_listings.sc_song_id = sc_songs.id)
6. 5,087.408 5,087.408 ↑ 1.2 8,218,281 7

Parallel Seq Scan on sc_chart_listings (cost=0.00..657,821.20 rows=9,556,996 width=36) (actual time=0.039..5,087.408 rows=8,218,281 loops=7)

  • Filter: (created_at >= '2017-09-25 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 3063
7. 0.063 0.284 ↑ 7.6 73 7

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

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

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=0.022..0.221 rows=73 loops=7)

  • Index Cond: (sc_account_id = 7675)
Planning time : 1.902 ms
Execution time : 9,172.552 ms