explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wIlR

Settings
# exclusive inclusive rows x rows loops node
1. 1,550.111 81,848.349 ↑ 5.9 6,171,488 1

Hash Join (cost=487.62..10,585,494.96 rows=36,585,027 width=64) (actual time=2.607..81,848.349 rows=6,171,488 loops=1)

  • Output: e.cid, e.lease_interval_id, e.event_type_id, e.event_datetime, e.default_event_result_id, COALESCE(er.default_event_result_ids, '{}'::integer[]), cpw.id
  • Hash Cond: (e.property_id = load_prop.property_id)
  • Buffers: shared hit=274555 read=262009 dirtied=47, local read=88 written=88
2. 68,175.986 80,298.178 ↑ 4.0 6,171,488 1

Hash Join (cost=477.25..9,775,359.59 rows=24,480,204 width=86) (actual time=2.535..80,298.178 rows=6,171,488 loops=1)

  • Output: e.cid, e.lease_interval_id, e.event_type_id, e.event_datetime, e.default_event_result_id, e.property_id, cpw.id, cpw.property_id, er.default_event_result_ids
  • Hash Cond: (e.property_id = cpw.property_id)
  • Join Filter: ((e.event_datetime >= cpw.start_date) AND (e.event_datetime <= (cpw.end_date + '1 day'::interval)))
  • Rows Removed by Join Filter: 312518167
  • Buffers: shared hit=274552 read=262009 dirtied=47, local read=86 written=86
3. 1,782.215 12,119.903 ↓ 1.0 8,774,264 1

Hash Left Join (cost=56.30..867,262.58 rows=8,753,995 width=74) (actual time=0.231..12,119.903 rows=8,774,264 loops=1)

  • Output: e.cid, e.lease_interval_id, e.event_type_id, e.event_datetime, e.default_event_result_id, e.property_id, er.default_event_result_ids
  • Inner Unique: true
  • Hash Cond: ((e.cid = er.cid) AND (e.event_result_id = er.id))
  • Buffers: shared hit=274552 read=262009 dirtied=47
4. 10,337.467 10,337.467 ↓ 1.0 8,774,264 1

Seq Scan on public.events e (cost=0.00..821,186.02 rows=8,753,995 width=32) (actual time=0.005..10,337.467 rows=8,774,264 loops=1)

  • Output: e.id, e.cid, e.property_id, e.property_unit_id, e.unit_space_id, e.event_type_id, e.event_sub_type_id, e.event_result_id, e.default_event_result_id, e.associated_event_id, e.ps_product_id, e.old_stage_id, e.new_stage_id, e.old_status_id, e.new_status_id, e.company_employee_id, e.data_reference_id, e.integration_result_id, e.lease_id, e.lease_interval_id, e.customer_id, e.scheduled_task_id, e.remote_primary_key, e.calendar_event_key, e.scheduled_datetime, e.scheduled_end_datetime, e.event_datetime, e.event_handle, e.title, e.notes, e.details, e.ip_address, e.do_not_export, e.is_resident, e.is_deleted, e.updated_by, e.updated_on, e.created_by, e.created_on, e.organization_contract_id
  • Filter: ((NOT e.is_deleted) AND (e.cid = 15077))
  • Rows Removed by Filter: 4260
  • Buffers: shared hit=274531 read=262009 dirtied=47
5. 0.089 0.221 ↑ 1.0 510 1

Hash (cost=38.45..38.45 rows=510 width=54) (actual time=0.221..0.221 rows=510 loops=1)

  • Output: er.default_event_result_ids, er.cid, er.id
  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
  • Buffers: shared hit=21
6. 0.132 0.132 ↑ 1.0 510 1

Seq Scan on public.event_results er (cost=0.00..38.45 rows=510 width=54) (actual time=0.006..0.132 rows=510 loops=1)

  • Output: er.default_event_result_ids, er.cid, er.id
  • Filter: (er.cid = 15077)
  • Rows Removed by Filter: 27
  • Buffers: shared hit=21
7. 0.793 2.289 ↑ 1.0 5,153 1

Hash (cost=253.47..253.47 rows=5,153 width=24) (actual time=2.289..2.289 rows=5,153 loops=1)

  • Output: cpw.id, cpw.cid, cpw.property_id, cpw.start_date, cpw.end_date
  • Buckets: 8192 Batches: 1 Memory Usage: 346kB
  • Buffers: local read=86 written=86
8. 1.496 1.496 ↑ 1.0 5,153 1

Seq Scan on pg_temp_23.property_weeks cpw (cost=0.00..253.47 rows=5,153 width=24) (actual time=0.012..1.496 rows=5,153 loops=1)

  • Output: cpw.id, cpw.cid, cpw.property_id, cpw.start_date, cpw.end_date
  • Filter: (cpw.cid = 15077)
  • Buffers: local read=86 written=86
9. 0.019 0.060 ↑ 1.0 134 1

Hash (cost=6.02..6.02 rows=134 width=4) (actual time=0.060..0.060 rows=134 loops=1)

  • Output: load_prop.property_id
  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: local read=2 written=2
10. 0.041 0.041 ↑ 1.0 134 1

Seq Scan on pg_temp_23.load_prop (cost=0.00..6.02 rows=134 width=4) (actual time=0.019..0.041 rows=134 loops=1)

  • Output: load_prop.property_id
  • Buffers: local read=2 written=2
Planning time : 1.862 ms
Execution time : 84,616.414 ms