explain.depesz.com

PostgreSQL's explain analyze made readable

Result: znNu

Settings
# exclusive inclusive rows x rows loops node
1. 434.757 13,199.803 ↓ 18,382.2 238,969 1

Nested Loop (cost=1.40..568.26 rows=13 width=105) (actual time=20.728..13,199.803 rows=238,969 loops=1)

  • Join Filter: (mr.maintenance_request_type_id = mrt.id)
  • Rows Removed by Join Filter: 716816
2. 1,004.883 12,765.046 ↓ 18,382.2 238,969 1

Nested Loop (cost=1.40..566.48 rows=13 width=104) (actual time=20.708..12,765.046 rows=238,969 loops=1)

3. 868.035 2,936.980 ↓ 6,051.6 2,941,061 1

Nested Loop (cost=0.97..319.68 rows=486 width=65) (actual time=20.571..2,936.980 rows=2,941,061 loops=1)

  • Join Filter: (lp.property_id = mr.property_id)
4. 0.006 20.532 ↑ 1.0 1 1

Nested Loop (cost=0.54..3.31 rows=1 width=33) (actual time=20.525..20.532 rows=1 loops=1)

5. 20.519 20.519 ↑ 1.0 1 1

Function Scan on load_properties lp (cost=0.25..1.00 rows=1 width=4) (actual time=20.515..20.519 rows=1 loops=1)

  • Filter: ((is_disabled = 0) AND (is_test = 0))
6. 0.007 0.007 ↑ 1.0 1 1

Index Scan using idx_properties_id on properties p (cost=0.29..2.31 rows=1 width=29) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = lp.property_id)
  • Filter: (cid = 235)
7. 2,048.413 2,048.413 ↓ 665.5 2,941,061 1

Index Scan using idx_maintenance_requests_property_id on maintenance_requests mr (cost=0.43..261.13 rows=4,419 width=44) (actual time=0.043..2,048.413 rows=2,941,061 loops=1)

  • Index Cond: (property_id = p.id)
  • Filter: (((deleted_on IS NULL) OR (deleted_on > '2019-02-01 00:00:00-07'::timestamp with time zone)) AND (cid = 235))
  • Rows Removed by Filter: 1135
8. 8,823.183 8,823.183 ↓ 0.0 0 2,941,061

Index Scan using idx_maintenance_request_details_maintenance_request_id on maintenance_request_details mrd (cost=0.43..0.50 rows=1 width=47) (actual time=0.003..0.003 rows=0 loops=2,941,061)

  • Index Cond: (maintenance_request_id = mr.id)
  • Filter: ((actual_start_datetime >= '2019-01-01 00:00:00-07'::timestamp with time zone) AND (actual_start_datetime <= '2019-02-04 23:59:59-07'::timestamp with time zone) AND (cid = 235))
  • Rows Removed by Filter: 1
9. 0.000 0.000 ↑ 1.0 4 238,969

Materialize (cost=0.00..1.06 rows=4 width=17) (actual time=0.000..0.000 rows=4 loops=238,969)

10. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on maintenance_request_types mrt (cost=0.00..1.04 rows=4 width=17) (actual time=0.008..0.008 rows=4 loops=1)

Planning time : 4.301 ms