explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PTNT5

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.184 152.999 ↑ 1.0 1 1

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

2. 62.980 152.815 ↓ 3.1 6,092 1

HashAggregate (cost=23,524.40..23,602.60 rows=1,955 width=230) (actual time=152.247..152.815 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. 32.754 89.835 ↓ 1.1 70,158 1

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

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

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

5. 3.588 16.562 ↓ 1.1 6,301 1

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

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

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

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

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