explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wYWh

Settings
# exclusive inclusive rows x rows loops node
1. 0.461 3,106.109 ↑ 1.0 1 1

Aggregate (cost=1,211.76..1,211.79 rows=1 width=8) (actual time=3,106.104..3,106.109 rows=1 loops=1)

2. 0.743 3,105.648 ↓ 735.0 735 1

Nested Loop Left Join (cost=21.55..1,211.76 rows=1 width=4) (actual time=0.560..3,105.648 rows=735 loops=1)

3. 0.770 3,102.700 ↓ 735.0 735 1

Nested Loop Left Join (cost=21.14..1,211.20 rows=1 width=12) (actual time=0.482..3,102.700 rows=735 loops=1)

4. 0.564 3,098.255 ↓ 735.0 735 1

Nested Loop Left Join (cost=20.72..1,208.83 rows=1 width=12) (actual time=0.436..3,098.255 rows=735 loops=1)

5. 1.097 3,088.871 ↓ 735.0 735 1

Nested Loop Left Join (cost=20.29..1,208.14 rows=1 width=20) (actual time=0.372..3,088.871 rows=735 loops=1)

6. 3.399 3,080.424 ↓ 735.0 735 1

Nested Loop (cost=19.87..1,205.67 rows=1 width=20) (actual time=0.338..3,080.424 rows=735 loops=1)

  • Join Filter: (SubPlan 1)
  • Rows Removed by Join Filter: 3,396
7. 2.043 127.491 ↓ 590.1 4,131 1

Nested Loop (cost=19.44..1,178.73 rows=7 width=28) (actual time=0.242..127.491 rows=4,131 loops=1)

8. 2.993 34.566 ↓ 59.9 4,131 1

Hash Join (cost=19.02..1,006.23 rows=69 width=20) (actual time=0.171..34.566 rows=4,131 loops=1)

  • Hash Cond: ((ca.lease_interval_type_id = ass.lease_interval_type_id) AND (ca.application_stage_id = ass.application_stage_id) AND (ca.application_status_id = ass.application_status_id))
9. 31.473 31.473 ↓ 43.5 4,131 1

Index Scan using idx_cached_applications_property_id on cached_applications ca (cost=0.43..980.23 rows=95 width=44) (actual time=0.055..31.473 rows=4,131 loops=1)

  • Index Cond: (property_id = 664,671)
  • Filter: (cid = 14,529)
10. 0.017 0.100 ↑ 1.0 68 1

Hash (cost=16.04..16.04 rows=68 width=12) (actual time=0.099..0.100 rows=68 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
11. 0.083 0.083 ↑ 1.0 68 1

Seq Scan on application_stage_statuses ass (cost=0.00..16.04 rows=68 width=12) (actual time=0.028..0.083 rows=68 loops=1)

12. 90.882 90.882 ↑ 1.0 1 4,131

Index Scan using idx_applicant_applications_cid_application_id on applicant_applications aa (cost=0.43..2.47 rows=1 width=12) (actual time=0.021..0.022 rows=1 loops=4,131)

  • Index Cond: ((cid = 14,529) AND (application_id = ca.id))
  • Filter: ((deleted_on IS NULL) AND (customer_type_id = 1))
  • Rows Removed by Filter: 0
13. 74.358 74.358 ↑ 1.0 1 4,131

Index Scan using idx_applicants_id on applicants ap (cost=0.43..0.89 rows=1 width=12) (actual time=0.018..0.018 rows=1 loops=4,131)

  • Index Cond: (id = aa.applicant_id)
  • Filter: (cid = 14,529)
14.          

SubPlan (for Nested Loop)

15. 2.611 2,875.176 ↓ 0.0 0 4,131

Append (cost=0.56..5.28 rows=2 width=4) (actual time=0.696..0.696 rows=0 loops=4,131)

16. 1,549.125 1,549.125 ↓ 0.0 0 4,131

Index Scan using idx_events_cid_lease_interval_id_event_datetime on events e (cost=0.56..2.61 rows=1 width=4) (actual time=0.375..0.375 rows=0 loops=4,131)

  • Index Cond: ((cid = 14,529) AND (lease_interval_id = ca.lease_interval_id) AND (event_datetime >= '08/30/2020 00:00:00 MDT'::timestamp with time zone) AND (event_datetime <= '09/01/2020 23:59:59 MDT'::timestamp with time zone))
  • Filter: (property_id = 664,671)
17. 1,323.440 1,323.440 ↓ 0.0 0 3,728

Index Scan using idx_events_cid_customer_id_event_datetime on events e_1 (cost=0.56..2.61 rows=1 width=4) (actual time=0.355..0.355 rows=0 loops=3,728)

  • Index Cond: ((cid = 14,529) AND (customer_id = ap.customer_id) AND (event_datetime >= '08/30/2020 00:00:00 MDT'::timestamp with time zone) AND (event_datetime <= '09/01/2020 23:59:59 MDT'::timestamp with time zone))
  • Filter: (property_id = 664,671)
  • Rows Removed by Filter: 0
18. 7.350 7.350 ↑ 1.0 1 735

Index Scan using idx_leases_id on leases l (cost=0.42..2.44 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=735)

  • Index Cond: (id = ca.lease_id)
  • Filter: ((cid = 14,529) AND (cid = ca.cid))
19. 8.820 8.820 ↑ 1.0 1 735

Index Scan using idx_lease_processes_cid_lease_id_customer_id on lease_processes lp (cost=0.42..0.66 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=735)

  • Index Cond: ((l.cid = cid) AND (cid = 14,529) AND (l.id = lease_id))
  • Filter: (customer_id IS NULL)
  • Rows Removed by Filter: 0
20. 3.675 3.675 ↑ 1.0 1 735

Index Scan using pk_property_units on property_units pu (cost=0.42..2.37 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=735)

  • Index Cond: ((cid = ca.cid) AND (cid = 14,529) AND (id = ca.property_unit_id))
  • Filter: (deleted_on IS NULL)
21. 2.205 2.205 ↑ 1.0 1 735

Index Only Scan using uk_unit_addresses_cid_property_unit_id_address_type_id on unit_addresses ua (cost=0.42..0.53 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=735)

  • Index Cond: ((cid = pu.cid) AND (cid = 14,529) AND (property_unit_id = pu.id))
  • Heap Fetches: 0
Planning time : 10.973 ms
Execution time : 3,106.398 ms