explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dmp : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #5Fhw; plan #fT3t; plan #vEwG; plan #4UsR; plan #Tk6F; plan #hGNZ; plan #dUYO; plan #26Ud

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 5.027 ↑ 1.0 31 1

Limit (cost=1,407.14..1,407.22 rows=31 width=194) (actual time=5.019..5.027 rows=31 loops=1)

  • Buffers: shared hit=1059 read=19
2. 0.185 5.025 ↑ 8.6 31 1

Sort (cost=1,407.14..1,407.81 rows=266 width=194) (actual time=5.018..5.025 rows=31 loops=1)

  • Sort Key: d0.last_changed_at DESC
  • Sort Method: top-N heapsort Memory: 38kB
  • Buffers: shared hit=1059 read=19
3. 0.290 4.840 ↑ 1.1 249 1

Hash Join (cost=130.45..1,399.22 rows=266 width=194) (actual time=2.360..4.840 rows=249 loops=1)

  • Hash Cond: (d0.last_changed_by_user_aggregate_id = u1.aggregate_id)
  • Buffers: shared hit=1059 read=19
4. 2.401 2.795 ↑ 1.1 249 1

Bitmap Heap Scan on damages d0 (cost=15.55..1,280.66 rows=266 width=179) (actual time=0.573..2.795 rows=249 loops=1)

  • Recheck Cond: ((creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid) OR (aggregate_id = '5e43b968-f979-490f-bf4f-1fa7c168d184'::uuid))
  • 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: 1252
  • Heap Blocks: exact=1010
  • Buffers: shared hit=1003 read=19
5. 0.005 0.394 ↓ 0.0 0 1

BitmapOr (cost=15.55..15.55 rows=342 width=0) (actual time=0.394..0.394 rows=0 loops=1)

  • Buffers: shared hit=12
6. 0.382 0.382 ↓ 4.4 1,501 1

Bitmap Index Scan on damages_creator_aggregate_id_index (cost=0.00..10.98 rows=341 width=0) (actual time=0.382..0.382 rows=1,501 loops=1)

  • Index Cond: (creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid)
  • Buffers: shared hit=9
7. 0.007 0.007 ↑ 1.0 1 1

Bitmap Index Scan on damages_aggregate_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (aggregate_id = '5e43b968-f979-490f-bf4f-1fa7c168d184'::uuid)
  • Buffers: shared hit=3
8. 1.030 1.755 ↑ 1.0 2,618 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 196kB
  • Buffers: shared hit=56
9. 0.725 0.725 ↑ 1.0 2,618 1

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

  • Buffers: shared hit=56