explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OAFN

Settings
# exclusive inclusive rows x rows loops node
1. 1.414 80.602 ↑ 5.2 72 1

GroupAggregate (cost=2,170.63..2,206.16 rows=374 width=610) (actual time=79.224..80.602 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.644 79.188 ↑ 1.1 344 1

Sort (cost=2,170.63..2,171.56 rows=374 width=585) (actual time=79.153..79.188 rows=344 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: 171kB
3. 0.170 77.544 ↑ 1.1 344 1

Nested Loop Left Join (cost=306.28..2,154.65 rows=374 width=585) (actual time=2.635..77.544 rows=344 loops=1)

4. 0.065 5.518 ↑ 1.0 72 1

Nested Loop Left Join (cost=305.56..994.81 rows=72 width=545) (actual time=2.618..5.518 rows=72 loops=1)

  • Join Filter: (clip_bookmark.clip_id = clip.id)
5. 0.104 5.237 ↑ 1.0 72 1

Hash Join (cost=305.56..941.60 rows=72 width=529) (actual time=2.378..5.237 rows=72 loops=1)

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

Nested Loop (cost=0.42..635.48 rows=72 width=516) (actual time=0.112..2.906 rows=72 loops=1)

7. 0.008 0.461 ↑ 1.0 72 1

Limit (cost=0.00..26.18 rows=72 width=342) (actual time=0.102..0.461 rows=72 loops=1)

8. 0.453 0.453 ↑ 3,590.5 72 1

Seq Scan on clip (cost=0.00..93,988.12 rows=258,513 width=342) (actual time=0.101..0.453 rows=72 loops=1)

  • Filter: (workspace_id = '8271b633-a524-46e8-9620-c2d15c7ce3c6'::uuid)
  • Rows Removed by Filter: 295
9. 2.376 2.376 ↑ 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.033..0.033 rows=1 loops=72)

  • Index Cond: (id = clip.media_id)
10. 1.238 2.227 ↓ 1.0 6,098 1

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

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

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

12. 0.000 0.216 ↓ 0.0 0 72

Materialize (cost=0.00..49.98 rows=3 width=16) (actual time=0.003..0.003 rows=0 loops=72)

13. 0.238 0.238 ↓ 0.0 0 1

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

  • Filter: (account_id = '505e48ea-de53-46a3-9d43-b974ecdedafd'::uuid)
  • Rows Removed by Filter: 2477
14. 0.179 71.856 ↑ 1.0 5 72

Nested Loop Left Join (cost=0.72..16.06 rows=5 width=56) (actual time=0.890..0.998 rows=5 loops=72)

15. 65.160 65.160 ↑ 1.0 5 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.886..0.905 rows=5 loops=72)

  • Index Cond: (clip_id = clip.id)
  • Heap Fetches: 343
16. 6.517 6.517 ↑ 1.0 1 343

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

  • Index Cond: (id = clip_tag.tag_id)
Planning time : 1.213 ms