explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JeK7o : Optimization for: plan #PTNT5

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.185 125.729 ↑ 1.0 1 1

Aggregate (cost=23,627.04..23,627.05 rows=1 width=8) (actual time=125.728..125.729 rows=1 loops=1)

2. 57.993 125.544 ↓ 3.1 6,092 1

HashAggregate (cost=23,524.40..23,602.60 rows=1,955 width=230) (actual time=124.990..125.544 rows=6,092 loops=1)

  • Group Key: rentalscore_property.id, CASE WHEN ((rentalscore_property.name IS NULL) OR ((rentalscore_property.name)::text = ''::text)) THEN rentalscore_property.address1 ELSE rentalscore_property.name END
  • Filter: (sum(CASE WHEN (upper((rentalscore_picture.processed_by)::text) ~~ '%RENTALSCORE.SCALES%'::text) THEN 1 ELSE 0 END) >= 1)
  • Rows Removed by Filter: 209
3. 28.179 67.551 ↓ 1.1 70,158 1

Hash Right Join (cost=3,114.93..22,414.45 rows=63,426 width=262) (actual time=4.075..67.551 rows=70,158 loops=1)

  • Hash Cond: (rentalscore_picture.property_id = rentalscore_property.id)
4. 35.325 35.325 ↑ 1.0 248,858 1

Seq Scan on rentalscore_picture (cost=0.00..18,487.58 rows=248,858 width=44) (actual time=0.020..35.325 rows=248,858 loops=1)

5. 0.697 4.047 ↓ 1.1 6,301 1

Hash (cost=3,041.61..3,041.61 rows=5,865 width=36) (actual time=4.046..4.047 rows=6,301 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 470kB
6. 3.101 3.350 ↓ 1.1 6,301 1

Bitmap Heap Scan on rentalscore_property (cost=121.33..3,041.61 rows=5,865 width=36) (actual time=0.470..3.350 rows=6,301 loops=1)

  • Filter: (active AND (review_state <= 20))
  • Rows Removed by Filter: 42
  • Heap Blocks: exact=2354
7. 0.249 0.249 ↑ 1.0 6,343 1

Bitmap Index Scan on rentalscore_property_active (cost=0.00..119.86 rows=6,343 width=0) (actual time=0.249..0.249 rows=6,343 loops=1)

  • Index Cond: (active = true)