explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5d0l : Base old

Settings
# exclusive inclusive rows x rows loops node
1. 1.316 412.816 ↑ 5.2 72 1

GroupAggregate (cost=105,543.86..105,579.39 rows=374 width=610) (actual time=411.529..412.816 rows=72 loops=1)

  • Group Key: clip.created_at, clip.id, clip.account_id, clip.workspace_id, clip.width, clip.height, clip.size, clip.ext, clip.type, clip.duration, clip.rotation, clip.audio, clip.remote, clip.status, clip.recorded_at, clip.updated_at, clip.digitized, clip.hash, clip.synced, clip.description, clip.source, clip.imported_name, clip_media.playback, clip_media.preview, clip_media.seek, clip_media.image, account.first_name, account.last_name, clip_bookmark.clip_id
2. 1.131 411.500 ↑ 1.3 296 1

Sort (cost=105,543.86..105,544.80 rows=374 width=585) (actual time=411.466..411.500 rows=296 loops=1)

  • Sort Key: clip.created_at DESC, clip.id DESC, clip.account_id, clip.workspace_id, clip.width, clip.height, clip.size, clip.ext, clip.type, clip.duration, clip.rotation, clip.audio, clip.remote, clip.status, clip.recorded_at, clip.updated_at, clip.digitized, clip.hash, clip.synced, clip.description, clip.source, clip.imported_name, clip_media.playback, clip_media.preview, clip_media.seek, clip_media.image, account.first_name, account.last_name, clip_bookmark.clip_id
  • Sort Method: quicksort Memory: 177kB
3. 0.086 410.369 ↑ 1.3 296 1

Nested Loop Left Join (cost=103,758.26..105,527.88 rows=374 width=585) (actual time=409.112..410.369 rows=296 loops=1)

4. 0.031 409.419 ↑ 1.0 72 1

Hash Left Join (cost=103,757.54..104,368.05 rows=72 width=545) (actual time=409.074..409.419 rows=72 loops=1)

  • Hash Cond: (clip.id = clip_bookmark.clip_id)
5. 0.075 409.166 ↑ 1.0 72 1

Hash Join (cost=103,707.54..104,317.59 rows=72 width=529) (actual time=408.835..409.166 rows=72 loops=1)

  • Hash Cond: (clip.account_id = account.id)
6. 0.013 406.823 ↑ 1.0 72 1

Nested Loop (cost=103,402.41..104,011.46 rows=72 width=516) (actual time=406.519..406.823 rows=72 loops=1)

7. 0.005 406.522 ↑ 1.0 72 1

Limit (cost=103,401.98..103,402.16 rows=72 width=342) (actual time=406.499..406.522 rows=72 loops=1)

8. 111.867 406.517 ↑ 3,038.7 72 1

Sort (cost=103,401.98..103,948.95 rows=218,787 width=342) (actual time=406.499..406.517 rows=72 loops=1)

  • Sort Key: clip.created_at DESC, clip.id DESC
  • Sort Method: top-N heapsort Memory: 44kB
9. 294.650 294.650 ↓ 1.1 244,947 1

Seq Scan on clip (cost=0.00..95,558.55 rows=218,787 width=342) (actual time=0.099..294.650 rows=244,947 loops=1)

  • Filter: (visible AND (NOT inactive) AND (status <> 'created'::text) AND (workspace_id = '8271b633-a524-46e8-9620-c2d15c7ce3c6'::uuid))
  • Rows Removed by Filter: 384962
10. 0.288 0.288 ↑ 1.0 1 72

Index Scan using clip_media_pkey on clip_media (cost=0.42..8.44 rows=1 width=206) (actual time=0.003..0.004 rows=1 loops=72)

  • Index Cond: (id = clip.media_id)
11. 1.224 2.268 ↓ 1.0 6,098 1

Hash (cost=228.95..228.95 rows=6,095 width=29) (actual time=2.268..2.268 rows=6,098 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 433kB
12. 1.044 1.044 ↓ 1.0 6,098 1

Seq Scan on account (cost=0.00..228.95 rows=6,095 width=29) (actual time=0.014..1.044 rows=6,098 loops=1)

13. 0.000 0.222 ↓ 0.0 0 1

Hash (cost=49.96..49.96 rows=3 width=16) (actual time=0.222..0.222 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
14. 0.222 0.222 ↓ 0.0 0 1

Seq Scan on clip_bookmark (cost=0.00..49.96 rows=3 width=16) (actual time=0.222..0.222 rows=0 loops=1)

  • Filter: (account_id = '505e48ea-de53-46a3-9d43-b974ecdedafd'::uuid)
  • Rows Removed by Filter: 2477
15. 0.208 0.864 ↑ 1.2 4 72

Nested Loop Left Join (cost=0.72..16.06 rows=5 width=56) (actual time=0.006..0.012 rows=4 loops=72)

16. 0.360 0.360 ↑ 1.2 4 72

Index Only Scan using clip_tag_clip_id_tag_id_key on clip_tag (cost=0.43..14.46 rows=5 width=32) (actual time=0.004..0.005 rows=4 loops=72)

  • Index Cond: (clip_id = clip.id)
  • Heap Fetches: 296
17. 0.296 0.296 ↑ 1.0 1 296

Index Scan using tag_pkey on tag (cost=0.29..0.31 rows=1 width=40) (actual time=0.001..0.001 rows=1 loops=296)

  • Index Cond: (id = clip_tag.tag_id)