explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WiWU

Settings
# exclusive inclusive rows x rows loops node
1. 51.174 1,428.326 ↓ 3.7 44 1

Nested Loop (cost=6.82..24,267.97 rows=12 width=4) (actual time=54.798..1,428.326 rows=44 loops=1)

2. 397.309 1,344.545 ↓ 3,623.0 3,623 1

Nested Loop (cost=6.39..24,261.04 rows=1 width=4) (actual time=0.882..1,344.545 rows=3,623 loops=1)

3. 341.968 656.880 ↓ 69.1 26,396 1

Nested Loop (cost=5.97..23,214.87 rows=382 width=4) (actual time=0.112..656.880 rows=26,396 loops=1)

4. 2.137 2.184 ↓ 1.7 248 1

Bitmap Heap Scan on units_building u2 (cost=5.54..551.62 rows=143 width=4) (actual time=0.066..2.184 rows=248 loops=1)

  • Recheck Cond: (management_company_id = 18,855)
  • Heap Blocks: exact=33
5. 0.047 0.047 ↓ 1.7 248 1

Bitmap Index Scan on units_building_management_company_id (cost=0.00..5.50 rows=143 width=0) (actual time=0.041..0.047 rows=248 loops=1)

  • Index Cond: (management_company_id = 18,855)
6. 312.728 312.728 ↓ 2.7 106 248

Index Scan using units_unit_4c63c6ae on units_unit u1 (cost=0.43..158.09 rows=39 width=8) (actual time=0.018..1.261 rows=106 loops=248)

  • Index Cond: (building_id = u2.id)
7. 290.356 290.356 ↓ 0.0 0 26,396

Index Scan using units_tenant_e8175980 on units_tenant u0 (cost=0.42..2.73 rows=1 width=8) (actual time=0.010..0.011 rows=0 loops=26,396)

  • Index Cond: (unit_id = u1.id)
  • Filter: (lease_start_date >= '2020-09-14'::date)
  • Rows Removed by Filter: 0
8. 32.607 32.607 ↓ 0.0 0 3,623

Index Scan using units_unit_current_tenant_id_key on units_unit u4 (cost=0.43..6.92 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=3,623)

  • Index Cond: (current_tenant_id = u0.id)
  • Filter: (id IS NOT NULL)
Planning time : 1.048 ms
Execution time : 1,428.822 ms