explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9v2K : Optimization for: 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; plan #Dmp

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.003 4.505 ↑ 1.0 31 1

Limit (cost=1,399.05..1,399.12 rows=31 width=194) (actual time=4.496..4.505 rows=31 loops=1)

  • Buffers: shared hit=1075
2. 0.171 4.502 ↑ 8.5 31 1

Sort (cost=1,399.05..1,399.71 rows=265 width=194) (actual time=4.495..4.502 rows=31 loops=1)

  • Sort Key: d0.last_changed_at DESC
  • Sort Method: top-N heapsort Memory: 38kB
  • Buffers: shared hit=1075
3. 0.139 4.331 ↑ 1.1 249 1

Hash Join (cost=125.95..1,391.16 rows=265 width=194) (actual time=2.254..4.331 rows=249 loops=1)

  • Hash Cond: (d0.last_changed_by_user_aggregate_id = u1.aggregate_id)
  • Buffers: shared hit=1075
4. 2.156 2.519 ↑ 1.1 249 1

Bitmap Heap Scan on damages d0 (cost=11.05..1,272.61 rows=265 width=179) (actual time=0.567..2.519 rows=249 loops=1)

  • Recheck Cond: (creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid)
  • Filter: (((((status)::text <> 'created'::text) OR (damage_identifier IS NOT NULL)) AND (((source)::text = 'dialogue'::text) OR ((source)::text = 'client'::text))) OR (aggregate_id = '5e43b968-f979-490f-bf4f-1fa7c168d184'::uuid))
  • Rows Removed by Filter: 1252
  • Heap Blocks: exact=1010
  • Buffers: shared hit=1019
5. 0.363 0.363 ↓ 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.363..0.363 rows=1,501 loops=1)

  • Index Cond: (creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid)
  • Buffers: shared hit=9
6. 0.987 1.673 ↑ 1.0 2,618 1

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

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

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

  • Buffers: shared hit=56
Planning time : 0.505 ms
Execution time : 4.554 ms