explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4UsR : Optimization for: Optimization for: Optimization for: plan #5Fhw; plan #fT3t; plan #vEwG

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.015 521.119 ↑ 1.0 31 1

Limit (cost=0.99..6,672.18 rows=31 width=198) (actual time=15.039..521.119 rows=31 loops=1)

  • Buffers: shared hit=165058 read=20578
2. 0.147 521.104 ↑ 217.1 31 1

Nested Loop (cost=0.99..1,448,295.71 rows=6,730 width=198) (actual time=15.037..521.104 rows=31 loops=1)

  • Buffers: shared hit=165058 read=20578
3. 98.680 519.593 ↑ 217.1 31 1

Nested Loop Left Join (cost=0.71..1,446,206.54 rows=6,730 width=183) (actual time=15.021..519.593 rows=31 loops=1)

  • Join Filter: (f2.damage_aggregate_id = d0.aggregate_id)
  • Rows Removed by Join Filter: 154279
  • Filter: ((d0.creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid) OR (f2.star_status = 1))
  • Rows Removed by Filter: 154249
  • Buffers: shared hit=164966 read=20577
4. 420.913 420.913 ↑ 4.2 154,280 1

Index Scan using test_3 on damages d0 (cost=0.42..152,724.49 rows=646,736 width=195) (actual time=0.993..420.913 rows=154,280 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: 52682
  • Buffers: shared hit=164963 read=20577
5. 0.000 0.000 ↑ 100.0 1 154,280

Materialize (cost=0.28..10.29 rows=100 width=20) (actual time=0.000..0.000 rows=1 loops=154,280)

  • Buffers: shared hit=3
6. 0.000 0.016 ↑ 100.0 1 1

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

  • Buffers: shared hit=3
7. 0.016 0.016 ↑ 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.014..0.016 rows=1 loops=1)

  • Index Cond: (aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid)
  • Buffers: shared hit=3
8. 1.364 1.364 ↑ 1.0 1 31

Index Scan using users_aggregate_id_index on users u1 (cost=0.28..0.30 rows=1 width=31) (actual time=0.043..0.044 rows=1 loops=31)

  • Index Cond: (aggregate_id = d0.last_changed_by_user_aggregate_id)
  • Buffers: shared hit=92 read=1
Planning time : 1.116 ms
Execution time : 521.273 ms