explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i3nO

Settings
# exclusive inclusive rows x rows loops node
1. 1.483 387.058 ↑ 5.2 72 1

GroupAggregate (cost=49,109.90..49,145.43 rows=374 width=610) (actual time=385.628..387.058 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. 4.193 385.575 ↑ 1.5 248 1

Sort (cost=49,109.90..49,110.83 rows=374 width=585) (actual time=385.537..385.575 rows=248 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: 152kB
3. 0.160 381.382 ↑ 1.5 248 1

Nested Loop Left Join (cost=46,559.03..49,093.92 rows=374 width=585) (actual time=224.422..381.382 rows=248 loops=1)

4. 0.120 241.110 ↑ 1.0 72 1

Hash Join (cost=46,558.31..47,934.09 rows=72 width=545) (actual time=224.408..241.110 rows=72 loops=1)

  • Hash Cond: (clip.account_id = account.id)
5. 0.031 238.492 ↑ 1.0 72 1

Nested Loop (cost=46,261.66..47,636.44 rows=72 width=532) (actual time=221.870..238.492 rows=72 loops=1)

6. 0.037 230.469 ↑ 1.0 72 1

Merge Left Join (cost=46,261.23..47,027.86 rows=72 width=358) (actual time=221.861..230.469 rows=72 loops=1)

  • Merge Cond: (clip.id = clip_bookmark.clip_id)
7. 0.020 230.181 ↑ 1.0 72 1

Limit (cost=46,211.24..46,976.95 rows=72 width=342) (actual time=221.608..230.181 rows=72 loops=1)

8. 0.107 230.161 ↑ 373.5 72 1

Group (cost=46,211.24..332,191.41 rows=26,891 width=342) (actual time=221.606..230.161 rows=72 loops=1)

  • Group Key: clip.id
9. 0.065 230.054 ↑ 373.5 72 1

Nested Loop (cost=46,211.24..332,124.18 rows=26,891 width=342) (actual time=221.603..230.054 rows=72 loops=1)

  • Join Filter: (clip_tag_1.clip_id = clip.id)
10. 0.120 229.609 ↑ 1,015.9 76 1

Merge Join (cost=46,210.82..209,620.55 rows=77,209 width=32) (actual time=221.582..229.609 rows=76 loops=1)

  • Merge Cond: (clip_1.id = clip_tag_1.clip_id)
11. 0.999 221.774 ↑ 1,202.4 266 1

Index Only Scan using clip_pkey on clip clip_1 (cost=46,071.22..73,109.96 rows=319,851 width=16) (actual time=221.568..221.774 rows=266 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 1
  • Heap Fetches: 0
12.          

SubPlan (forIndex Only Scan)

13. 0.537 220.775 ↓ 12.2 1,934 1

Nested Loop (cost=0.42..46,070.40 rows=159 width=16) (actual time=8.502..220.775 rows=1,934 loops=1)

14. 214.436 214.436 ↓ 12.2 1,934 1

Seq Scan on clip_tag clip_tag_2 (cost=0.00..45,370.45 rows=159 width=16) (actual time=8.492..214.436 rows=1,934 loops=1)

  • Filter: (tag_id = 'd86b5216-7f3f-4db5-81f6-4ae37ecd0838'::uuid)
  • Rows Removed by Filter: 2338430
15. 5.802 5.802 ↑ 1.0 1 1,934

Index Only Scan using clip_pkey on clip clip_2 (cost=0.42..4.39 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=1,934)

  • Index Cond: (id = clip_tag_2.clip_id)
  • Heap Fetches: 1
16. 7.715 7.715 ↑ 2,031.8 76 1

Index Only Scan using clip_tag_clip_id_tag_id_key on clip_tag clip_tag_1 (cost=0.43..134,692.00 rows=154,418 width=16) (actual time=0.010..7.715 rows=76 loops=1)

  • Index Cond: (tag_id = '106b95a6-53ea-4591-8c33-1e2e227cedca'::uuid)
  • Heap Fetches: 76
17. 0.380 0.380 ↑ 1.0 1 76

Index Scan using clip_pkey on clip (cost=0.42..1.57 rows=1 width=342) (actual time=0.005..0.005 rows=1 loops=76)

  • Index Cond: (id = clip_1.id)
  • Filter: (visible AND (NOT inactive) AND (status <> 'created'::text) AND (workspace_id = '8271b633-a524-46e8-9620-c2d15c7ce3c6'::uuid))
  • Rows Removed by Filter: 0
18. 0.008 0.251 ↓ 0.0 0 1

Sort (cost=49.99..49.99 rows=3 width=16) (actual time=0.251..0.251 rows=0 loops=1)

  • Sort Key: clip_bookmark.clip_id
  • Sort Method: quicksort Memory: 25kB
19. 0.243 0.243 ↓ 0.0 0 1

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

  • Filter: (account_id = '505e48ea-de53-46a3-9d43-b974ecdedafd'::uuid)
  • Rows Removed by Filter: 2477
20. 7.992 7.992 ↑ 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.110..0.111 rows=1 loops=72)

  • Index Cond: (id = clip.media_id)
21. 1.409 2.498 ↓ 1.1 6,106 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 433kB
22. 1.089 1.089 ↓ 1.1 6,106 1

Seq Scan on account (cost=0.00..225.18 rows=5,718 width=29) (actual time=0.005..1.089 rows=6,106 loops=1)

23. 0.112 140.112 ↑ 1.7 3 72

Nested Loop Left Join (cost=0.72..16.06 rows=5 width=56) (actual time=0.073..1.946 rows=3 loops=72)

24. 3.600 3.600 ↑ 1.7 3 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.003..0.050 rows=3 loops=72)

  • Index Cond: (clip_id = clip.id)
  • Heap Fetches: 248
25. 136.400 136.400 ↑ 1.0 1 248

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

  • Index Cond: (id = clip_tag.tag_id)