explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Puow

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.020 3,406.368 ↑ 1.0 31 1

Limit (cost=0.71..28,383.76 rows=31 width=194) (actual time=73.511..3,406.368 rows=31 loops=1)

  • Buffers: shared hit=1714463 read=58922
2. 381.686 3,406.348 ↑ 12.7 31 1

Nested Loop (cost=0.71..360,740.17 rows=394 width=194) (actual time=73.511..3,406.348 rows=31 loops=1)

  • Buffers: shared hit=1714463 read=58922
3. 1,739.705 1,739.705 ↑ 1.5 428,319 1

Index Scan using test_1 on damages d0 (cost=0.42..156,881.03 rows=646,283 width=179) (actual time=0.631..1,739.705 rows=428,319 loops=1)

  • Filter: ((((status)::text <> 'created'::text) OR (damage_identifier IS NOT NULL)) AND (((source)::text = 'dialogue'::text) OR ((source)::text = 'client'::text)) AND (((source)::text = 'dialogue'::text) OR ((source)::text = 'client'::text)))
  • Rows Removed by Filter: 167673
  • Buffers: shared hit=424130 read=58914
4. 1,284.957 1,284.957 ↓ 0.0 0 428,319

Index Scan using users_aggregate_id_index on users u1 (cost=0.28..0.31 rows=1 width=31) (actual time=0.003..0.003 rows=0 loops=428,319)

  • Index Cond: (aggregate_id = d0.last_changed_by_user_aggregate_id)
  • Filter: ((company_aggregate_id = '7b0caaa5-91db-47d1-81b4-d7441e125de0'::uuid) AND (((full_name)::text ~~* '%test%'::text) OR ((d0.damage_identifier)::text ~~* '%test%'::text)))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1290333 read=8