explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kjqt

Settings
# exclusive inclusive rows x rows loops node
1. 293.191 15,279.167 ↓ 17,266.0 189,926 1

Nested Loop (cost=1.40..568.25 rows=11 width=137) (actual time=46.207..15,279.167 rows=189,926 loops=1)

  • Join Filter: (mr.maintenance_request_type_id = mrt.id)
  • Rows Removed by Join Filter: 569687
2. 2,801.735 14,985.976 ↓ 17,266.0 189,926 1

Nested Loop (cost=1.40..566.59 rows=11 width=136) (actual time=44.958..14,985.976 rows=189,926 loops=1)

3. 962.720 3,361.058 ↓ 6,051.6 2,941,061 1

Nested Loop (cost=0.97..319.80 rows=486 width=65) (actual time=44.737..3,361.058 rows=2,941,061 loops=1)

  • Join Filter: (lp.property_id = mr.property_id)
4. 0.010 44.667 ↑ 1.0 1 1

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

5. 44.644 44.644 ↑ 1.0 1 1

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

  • Filter: ((is_disabled = 0) AND (is_test = 0))
6. 0.013 0.013 ↑ 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.012..0.013 rows=1 loops=1)

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

Index Scan using idx_maintenance_requests_property_id on maintenance_requests mr (cost=0.43..261.22 rows=4,421 width=44) (actual time=0.076..2,353.671 rows=2,941,061 loops=1)

  • Index Cond: (property_id = p.id)
  • Filter: (((deleted_on IS NULL) OR (deleted_on > '2019-01-31 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=79) (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-01-31 23:59:59-07'::timestamp with time zone) AND (cid = 235))
  • Rows Removed by Filter: 1
9. 0.000 0.000 ↑ 1.0 4 189,926

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

10. 0.006 0.006 ↑ 1.0 4 1

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

Planning time : 3.354 ms