explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ofRr

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.397 ↑ 1.0 1 1

Nested Loop (cost=3.27..18.75 rows=1 width=383) (actual time=0.394..0.397 rows=1 loops=1)

2. 0.001 0.319 ↑ 1.0 1 1

Nested Loop (cost=2.84..15.26 rows=1 width=354) (actual time=0.316..0.319 rows=1 loops=1)

3. 0.002 0.268 ↑ 1.0 1 1

Nested Loop (cost=2.41..12.76 rows=1 width=237) (actual time=0.266..0.268 rows=1 loops=1)

4. 0.002 0.207 ↑ 1.0 1 1

Nested Loop (cost=1.98..10.26 rows=1 width=205) (actual time=0.206..0.207 rows=1 loops=1)

  • Join Filter: (l.primary_customer_id = lc.customer_id)
5. 0.002 0.155 ↑ 1.0 1 1

Nested Loop (cost=1.55..9.75 rows=1 width=205) (actual time=0.154..0.155 rows=1 loops=1)

6. 0.001 0.105 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.12..7.28 rows=1 width=154) (actual time=0.104..0.105 rows=1 loops=1)

7. 0.004 0.103 ↑ 1.0 1 1

Nested Loop (cost=0.70..4.79 rows=1 width=137) (actual time=0.102..0.103 rows=1 loops=1)

8. 0.080 0.080 ↑ 1.0 1 1

Index Scan using leases_cid_unit_space_id_id_key on leases l (cost=0.43..2.47 rows=1 width=118) (actual time=0.080..0.080 rows=1 loops=1)

  • Index Cond: ((cid = 3395) AND (id = 12593005))
9. 0.019 0.019 ↑ 1.0 1 1

Index Scan using idx_properties_id on properties p (cost=0.28..2.31 rows=1 width=27) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (id = l.property_id)
  • Filter: (cid = 3395)
10. 0.001 0.001 ↓ 0.0 0 1

Index Scan using idx_unit_spaces on unit_spaces us (cost=0.42..2.46 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (l.unit_space_id = id)
  • Filter: ((cid = 3395) AND (l.cid = cid))
11. 0.048 0.048 ↑ 1.0 1 1

Index Scan using idx_customers_id on customers c (cost=0.43..2.47 rows=1 width=55) (actual time=0.048..0.048 rows=1 loops=1)

  • Index Cond: (id = l.primary_customer_id)
  • Filter: (cid = 3395)
12. 0.050 0.050 ↑ 1.0 1 1

Index Only Scan using idx_lease_customers_cid_lease_id_customer_id_lease_status_type_ on lease_customers lc (cost=0.43..0.48 rows=1 width=16) (actual time=0.050..0.050 rows=1 loops=1)

  • Index Cond: ((cid = 3395) AND (lease_id = 12593005) AND (customer_id = c.id))
  • Heap Fetches: 0
13. 0.059 0.059 ↑ 1.0 1 1

Index Scan using idx_lease_details_lease_id on lease_details ld (cost=0.43..2.47 rows=1 width=40) (actual time=0.059..0.059 rows=1 loops=1)

  • Index Cond: (lease_id = 12593005)
  • Filter: (cid = 3395)
14. 0.050 0.050 ↑ 1.0 1 1

Index Scan using idx_lease_processes_lease_id on lease_processes lp (cost=0.43..2.47 rows=1 width=125) (actual time=0.050..0.050 rows=1 loops=1)

  • Index Cond: (lease_id = 12593005)
  • Filter: ((customer_id IS NULL) AND (cid = 3395))
15. 0.076 0.076 ↑ 1.0 1 1

Index Scan using idx_lease_intervals on lease_intervals li (cost=0.43..2.47 rows=1 width=37) (actual time=0.076..0.076 rows=1 loops=1)

  • Index Cond: (id = l.active_lease_interval_id)
  • Filter: ((cid = 3395) AND (lease_id = 12593005))
Planning time : 31.010 ms
Execution time : 4.304 ms