explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aWE9 : New tag 106 (biggest)

Settings
# exclusive inclusive rows x rows loops node
1. 1.434 1,465.212 ↑ 5.2 72 1

GroupAggregate (cost=212,002.80..212,038.33 rows=374 width=610) (actual time=1,463.799..1,465.212 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.332 1,463.778 ↑ 1.1 346 1

Sort (cost=212,002.80..212,003.74 rows=374 width=585) (actual time=1,463.741..1,463.778 rows=346 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: 203kB
3. 0.081 1,462.446 ↑ 1.1 346 1

Nested Loop Left Join (cost=209,971.75..211,986.82 rows=374 width=585) (actual time=1,459.813..1,462.446 rows=346 loops=1)

4. 0.030 1,461.357 ↑ 1.0 72 1

Hash Left Join (cost=209,971.03..210,826.99 rows=72 width=545) (actual time=1,459.794..1,461.357 rows=72 loops=1)

  • Hash Cond: (clip.id = clip_bookmark.clip_id)
5. 0.078 1,461.076 ↑ 1.0 72 1

Nested Loop (cost=209,921.03..210,776.53 rows=72 width=529) (actual time=1,459.534..1,461.076 rows=72 loops=1)

6. 0.503 1,460.782 ↑ 1.0 72 1

Hash Join (cost=209,920.61..210,167.95 rows=72 width=355) (actual time=1,459.520..1,460.782 rows=72 loops=1)

  • Hash Cond: (account.id = clip.account_id)
7. 0.851 0.851 ↓ 1.1 6,112 1

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

8. 0.016 1,459.428 ↑ 1.0 72 1

Hash (cost=209,919.71..209,919.71 rows=72 width=342) (actual time=1,459.428..1,459.428 rows=72 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
9. 0.011 1,459.412 ↑ 1.0 72 1

Limit (cost=209,918.81..209,918.99 rows=72 width=342) (actual time=1,459.396..1,459.412 rows=72 loops=1)

10. 64.828 1,459.401 ↑ 747.0 72 1

Sort (cost=209,918.81..210,053.26 rows=53,783 width=342) (actual time=1,459.395..1,459.401 rows=72 loops=1)

  • Sort Key: clip.created_at DESC, clip.id DESC
  • Sort Method: top-N heapsort Memory: 44kB
11. 96.888 1,394.573 ↓ 2.8 150,446 1

Group (cost=179,141.08..207,990.71 rows=53,783 width=342) (actual time=1,002.218..1,394.573 rows=150,446 loops=1)

  • Group Key: clip.id
12. 108.176 1,297.685 ↓ 2.8 150,446 1

Merge Join (cost=179,141.08..207,856.25 rows=53,783 width=342) (actual time=1,002.216..1,297.685 rows=150,446 loops=1)

  • Merge Cond: (clip_tag_1.clip_id = clip_1.id)
13. 203.704 1,064.421 ↓ 2.8 150,446 1

Sort (cost=178,999.70..179,134.15 rows=53,783 width=358) (actual time=1,002.178..1,064.421 rows=150,446 loops=1)

  • Sort Key: clip.id DESC
  • Sort Method: external merge Disk: 34192kB
14. 164.612 860.717 ↓ 2.8 150,446 1

Hash Join (cost=108,122.39..165,946.73 rows=53,783 width=358) (actual time=479.220..860.717 rows=150,446 loops=1)

  • Hash Cond: (clip_tag_1.clip_id = clip.id)
15. 226.131 226.131 ↓ 1.0 157,514 1

Seq Scan on clip_tag clip_tag_1 (cost=0.00..45,370.45 rows=154,418 width=16) (actual time=7.401..226.131 rows=157,514 loops=1)

  • Filter: (tag_id = '106b95a6-53ea-4591-8c33-1e2e227cedca'::uuid)
  • Rows Removed by Filter: 2182844
16. 158.136 469.974 ↓ 1.1 244,947 1

Hash (cost=95,558.55..95,558.55 rows=218,787 width=342) (actual time=469.974..469.974 rows=244,947 loops=1)

  • Buckets: 16384 Batches: 32 Memory Usage: 1937kB
17. 311.838 311.838 ↓ 1.1 244,947 1

Seq Scan on clip (cost=0.00..95,558.55 rows=218,787 width=342) (actual time=0.088..311.838 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: 383417
18. 125.088 125.088 ↓ 1.0 628,364 1

Index Only Scan Backward using clip_pkey on clip clip_1 (cost=0.42..26,620.34 rows=628,170 width=16) (actual time=0.029..125.088 rows=628,364 loops=1)

  • Heap Fetches: 16416
19. 0.216 0.216 ↑ 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.003 rows=1 loops=72)

  • Index Cond: (id = clip.media_id)
20. 0.000 0.251 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
21. 0.251 0.251 ↓ 0.0 0 1

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

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

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

23. 0.360 0.360 ↑ 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.004..0.005 rows=5 loops=72)

  • Index Cond: (clip_id = clip.id)
  • Heap Fetches: 346
24. 0.692 0.692 ↑ 1.0 1 346

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

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