explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fT3t : Optimization for: plan #5Fhw

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.018 1,035.089 ↑ 1.0 100 1

Limit (cost=48,881.83..48,882.08 rows=100 width=198) (actual time=1,035.043..1,035.089 rows=100 loops=1)

  • Buffers: shared hit=8 read=31472
2. 1.301 1,035.071 ↑ 67.3 100 1

Sort (cost=48,881.83..48,898.66 rows=6,730 width=198) (actual time=1,035.041..1,035.071 rows=100 loops=1)

  • Sort Key: d0.last_changed_at DESC
  • Sort Method: top-N heapsort Memory: 64kB
  • Buffers: shared hit=8 read=31472
3. 0.687 1,033.770 ↑ 27.0 249 1

Hash Join (cost=125.95..48,624.61 rows=6,730 width=198) (actual time=9.022..1,033.770 rows=249 loops=1)

  • Hash Cond: (d0.last_changed_by_user_aggregate_id = u1.aggregate_id)
  • Buffers: shared hit=8 read=31469
4. 257.292 1,025.821 ↑ 27.0 249 1

Hash Left Join (cost=11.04..48,400.35 rows=6,730 width=183) (actual time=1.665..1,025.821 rows=249 loops=1)

  • Hash Cond: (d0.aggregate_id = f2.damage_aggregate_id)
  • Filter: ((d0.creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid) OR (f2.star_status = 1))
  • Rows Removed by Filter: 607653
  • Buffers: shared hit=5 read=31416
5. 768.031 768.031 ↑ 1.1 607,902 1

Seq Scan on damages d0 (cost=0.00..45,962.87 rows=646,736 width=195) (actual time=0.016..768.031 rows=607,902 loops=1)

  • Filter: ((((status)::text <> 'created'::text) OR (damage_identifier IS NOT NULL)) AND (((source)::text = 'dialogue'::text) OR ((source)::text = 'client'::text)))
  • Rows Removed by Filter: 223405
  • Buffers: shared hit=2 read=31413
6. 0.011 0.498 ↑ 100.0 1 1

Hash (cost=9.79..9.79 rows=100 width=20) (actual time=0.498..0.498 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1 read=2
7. 0.002 0.487 ↑ 100.0 1 1

Subquery Scan on f2 (cost=0.28..9.79 rows=100 width=20) (actual time=0.484..0.487 rows=1 loops=1)

  • Buffers: shared hit=1 read=2
8. 0.485 0.485 ↑ 100.0 1 1

Index Scan using users_aggregate_id_index on users s (cost=0.28..8.79 rows=100 width=62) (actual time=0.482..0.485 rows=1 loops=1)

  • Index Cond: (aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid)
  • Buffers: shared hit=1 read=2
9. 1.251 7.262 ↑ 1.0 2,618 1

Hash (cost=82.18..82.18 rows=2,618 width=31) (actual time=7.262..7.262 rows=2,618 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 196kB
  • Buffers: shared hit=3 read=53
10. 6.011 6.011 ↑ 1.0 2,618 1

Seq Scan on users u1 (cost=0.00..82.18 rows=2,618 width=31) (actual time=0.253..6.011 rows=2,618 loops=1)

  • Buffers: shared hit=3 read=53