explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z9OR

Settings
# exclusive inclusive rows x rows loops node
1. 1.599 214.075 ↑ 5.2 72 1

GroupAggregate (cost=2,167.42..2,202.95 rows=374 width=610) (actual time=212.525..214.075 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.888 212.476 ↑ 1.0 371 1

Sort (cost=2,167.42..2,168.35 rows=374 width=585) (actual time=212.446..212.476 rows=371 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: 216kB
3. 0.165 210.588 ↑ 1.0 371 1

Nested Loop Left Join (cost=297.80..2,151.43 rows=374 width=585) (actual time=5.300..210.588 rows=371 loops=1)

4. 0.018 5.727 ↑ 1.0 72 1

Nested Loop Left Join (cost=297.08..991.60 rows=72 width=545) (actual time=2.680..5.727 rows=72 loops=1)

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

Hash Join (cost=297.08..938.39 rows=72 width=529) (actual time=2.437..5.421 rows=72 loops=1)

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

Nested Loop (cost=0.42..640.75 rows=72 width=516) (actual time=0.121..3.016 rows=72 loops=1)

7. 0.017 0.963 ↑ 1.0 72 1

Limit (cost=0.00..31.45 rows=72 width=342) (actual time=0.109..0.963 rows=72 loops=1)

8. 0.946 0.946 ↑ 3,038.7 72 1

Seq Scan on clip (cost=0.00..95,558.55 rows=218,787 width=342) (actual time=0.108..0.946 rows=72 loops=1)

  • Filter: (visible AND (NOT inactive) AND (status <> 'created'::text) AND (workspace_id = '8271b633-a524-46e8-9620-c2d15c7ce3c6'::uuid))
  • Rows Removed by Filter: 2004
9. 2.016 2.016 ↑ 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.027..0.028 rows=1 loops=72)

  • Index Cond: (id = clip.media_id)
10. 1.304 2.279 ↓ 1.1 6,107 1

Hash (cost=225.18..225.18 rows=5,718 width=29) (actual time=2.279..2.279 rows=6,107 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 433kB
11. 0.975 0.975 ↓ 1.1 6,107 1

Seq Scan on account (cost=0.00..225.18 rows=5,718 width=29) (actual time=0.002..0.975 rows=6,107 loops=1)

12. 0.050 0.288 ↓ 0.0 0 72

Materialize (cost=0.00..49.98 rows=3 width=16) (actual time=0.004..0.004 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.153 204.696 ↑ 1.0 5 72

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

15. 160.632 160.632 ↑ 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=2.207..2.231 rows=5 loops=72)

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

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

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