explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y2ea

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 257.068 ↑ 2.8 20 1

Sort (cost=455,204.84..455,204.98 rows=55 width=359) (actual time=257.061..257.068 rows=20 loops=1)

  • Sort Key: ((0 - COALESCE((playlists.num_visible_assets)::bigint, count(playlist_asset_settings.id)))), (('0'::double precision - COALESCE(playlists.quality, '0'::double precision))), ((0 - playlists.num_assets))
  • Sort Method: quicksort Memory: 35kB
2. 0.943 256.998 ↑ 2.8 20 1

GroupAggregate (cost=455,181.27..455,203.25 rows=55 width=359) (actual time=255.599..256.998 rows=20 loops=1)

  • Group Key: playlists.id
3. 3.171 256.055 ↑ 2.0 1,386 1

Sort (cost=455,181.27..455,188.23 rows=2,784 width=355) (actual time=255.576..256.055 rows=1,386 loops=1)

  • Sort Key: playlists.id
  • Sort Method: quicksort Memory: 647kB
4. 1.731 252.884 ↑ 2.0 1,386 1

Nested Loop (cost=1.26..455,021.99 rows=2,784 width=355) (actual time=3.377..252.884 rows=1,386 loops=1)

5. 20.393 20.393 ↑ 2.8 20 1

Index Scan using index_playlists_on_user_id_and_deleted_at on playlists (cost=0.56..168.47 rows=55 width=339) (actual time=1.813..20.393 rows=20 loops=1)

  • Index Cond: ((user_id = '1c96a8ec-0621-11e9-bcb6-0eb90c5bb168'::uuid) AND (deleted_at IS NULL))
  • Filter: ((published_at IS NOT NULL) AND (source_id IS NULL))
  • Rows Removed by Filter: 54
6. 230.760 230.760 ↑ 113.1 69 20

Index Scan using index_pas_on_playlist_id_and_asset_id_not_deleted on playlist_asset_settings (cost=0.70..8,192.01 rows=7,805 width=32) (actual time=0.707..11.538 rows=69 loops=20)

  • Index Cond: (playlist_id = playlists.id)
Planning time : 1.385 ms
Execution time : 257.282 ms