explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.024 3,986.133 ↑ 1.0 31 1

Limit (cost=0.86..28.74 rows=31 width=210) (actual time=114.949..3,986.133 rows=31 loops=1)

  • Buffers: shared hit=786321 read=14795
2. 58.199 3,986.109 ↑ 20,758.2 31 1

Nested Loop Left Join (cost=0.86..578,769.18 rows=643,504 width=210) (actual time=114.947..3,986.109 rows=31 loops=1)

  • Filter: ((d0.creator_aggregate_id = '32ef45cb-b54a-4d29-bb92-aef88272eb57'::uuid) OR (f2.damage_aggregate_id IS NOT NULL))
  • Rows Removed by Filter: 153444
  • Buffers: shared hit=786321 read=14795
3. 138.667 3,774.435 ↑ 4.2 153,475 1

Nested Loop (cost=0.71..351,871.81 rows=646,736 width=226) (actual time=1.300..3,774.435 rows=153,475 loops=1)

  • Buffers: shared hit=632816 read=14795
4. 3,175.343 3,175.343 ↑ 4.2 153,475 1

Index Scan using test_3 on damages d0 (cost=0.42..152,724.49 rows=646,736 width=195) (actual time=1.283..3,175.343 rows=153,475 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: 52099
  • Buffers: shared hit=169638 read=14795
5. 460.425 460.425 ↑ 1.0 1 153,475

Index Scan using users_aggregate_id_index on users u1 (cost=0.28..0.30 rows=1 width=31) (actual time=0.003..0.003 rows=1 loops=153,475)

  • Index Cond: (aggregate_id = d0.last_changed_by_user_aggregate_id)
  • Buffers: shared hit=463178
6. 153.475 153.475 ↓ 0.0 0 153,475

Index Scan using user_starred_damages_user_aggregate_id_index on user_starred_damages f2 (cost=0.15..0.28 rows=6 width=32) (actual time=0.001..0.001 rows=0 loops=153,475)

  • Index Cond: (u1.aggregate_id = user_aggregate_id)
  • Buffers: shared hit=153505
Planning time : 3.110 ms
Execution time : 3,986.261 ms