explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RMYn

Settings
# exclusive inclusive rows x rows loops node
1. 1,734.349 18,666.290 ↑ 3.2 244,947 1

Sort (cost=1,327,224.87..1,329,163.22 rows=775,340 width=610) (actual time=18,537.268..18,666.290 rows=244,947 loops=1)

  • Sort Key: clip.created_at DESC, clip.id DESC
  • Sort Method: external merge Disk: 159256kB
2. 3,796.626 16,931.941 ↑ 3.2 244,947 1

GroupAggregate (cost=794,409.34..827,361.29 rows=775,340 width=610) (actual time=11,850.536..16,931.941 rows=244,947 loops=1)

  • Group Key: clip.id, clip_media.playback, clip_media.preview, clip_media.seek, clip_media.image, account.first_name, account.last_name, clip_bookmark.clip_id
3. 6,052.584 13,135.315 ↓ 1.2 893,948 1

Sort (cost=794,409.34..796,347.69 rows=775,340 width=585) (actual time=11,850.480..13,135.315 rows=893,948 loops=1)

  • Sort Key: clip.id DESC, clip_media.playback, clip_media.preview, clip_media.seek, clip_media.image, account.first_name, account.last_name, clip_bookmark.clip_id
  • Sort Method: external merge Disk: 266696kB
4. 329.104 7,082.731 ↓ 1.2 893,948 1

Hash Left Join (cost=198,062.34..310,449.76 rows=775,340 width=585) (actual time=1,588.556..7,082.731 rows=893,948 loops=1)

  • Hash Cond: (clip_tag.tag_id = tag.id)
5. 4,968.824 6,741.793 ↓ 1.2 893,948 1

Hash Right Join (cost=196,349.85..298,076.35 rows=775,340 width=561) (actual time=1,576.481..6,741.793 rows=893,948 loops=1)

  • Hash Cond: (clip_tag.clip_id = clip.id)
6. 220.117 220.117 ↓ 1.1 2,340,364 1

Seq Scan on clip_tag (cost=0.00..39,805.16 rows=2,226,116 width=32) (actual time=0.099..220.117 rows=2,340,364 loops=1)

7. 172.476 1,552.852 ↓ 1.1 244,947 1

Hash (cost=178,231.02..178,231.02 rows=218,787 width=545) (actual time=1,552.852..1,552.852 rows=244,947 loops=1)

  • Buckets: 8192 Batches: 32 Memory Usage: 2198kB
8. 49.047 1,380.376 ↓ 1.1 244,947 1

Hash Left Join (cost=108,469.04..178,231.02 rows=218,787 width=545) (actual time=521.906..1,380.376 rows=244,947 loops=1)

  • Hash Cond: (clip.id = clip_bookmark.clip_id)
9. 67.754 1,331.101 ↓ 1.1 244,947 1

Hash Join (cost=108,419.04..176,813.59 rows=218,787 width=529) (actual time=521.667..1,331.101 rows=244,947 loops=1)

  • Hash Cond: (clip.account_id = account.id)
10. 659.606 1,261.103 ↓ 1.1 244,947 1

Hash Join (cost=108,122.39..173,508.61 rows=218,787 width=516) (actual time=519.384..1,261.103 rows=244,947 loops=1)

  • Hash Cond: (clip_media.id = clip.media_id)
11. 116.506 116.506 ↓ 1.0 639,871 1

Seq Scan on clip_media (cost=0.00..16,381.16 rows=613,316 width=206) (actual time=0.084..116.506 rows=639,871 loops=1)

12. 170.176 484.991 ↓ 1.1 244,947 1

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

  • Buckets: 16384 Batches: 32 Memory Usage: 1959kB
13. 314.815 314.815 ↓ 1.1 244,947 1

Seq Scan on clip (cost=0.00..95,558.55 rows=218,787 width=342) (actual time=0.112..314.815 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: 383223
14. 1.275 2.244 ↓ 1.1 6,107 1

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

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

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

16. 0.000 0.228 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
17. 0.228 0.228 ↓ 0.0 0 1

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

  • Filter: (account_id = '505e48ea-de53-46a3-9d43-b974ecdedafd'::uuid)
  • Rows Removed by Filter: 2477
18. 6.578 11.834 ↑ 1.3 31,241 1

Hash (cost=1,211.66..1,211.66 rows=40,066 width=40) (actual time=11.834..11.834 rows=31,241 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2793kB
19. 5.256 5.256 ↑ 1.3 31,241 1

Seq Scan on tag (cost=0.00..1,211.66 rows=40,066 width=40) (actual time=0.081..5.256 rows=31,241 loops=1)