explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JhRA : Optimization for: plan #4ryn

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.222 17.393 ↓ 2,861.0 2,861 1

Nested Loop (cost=5.35..60.35 rows=1 width=33) (actual time=0.089..17.393 rows=2,861 loops=1)

2. 0.000 10.449 ↓ 2,861.0 2,861 1

Nested Loop (cost=4.93..51.91 rows=1 width=28) (actual time=0.072..10.449 rows=2,861 loops=1)

3. 0.529 4.799 ↓ 2,861.0 2,861 1

Nested Loop (cost=4.64..43.59 rows=1 width=28) (actual time=0.060..4.799 rows=2,861 loops=1)

4. 0.082 2.510 ↓ 352.0 352 1

Nested Loop (cost=0.28..14.63 rows=1 width=28) (actual time=0.036..2.510 rows=352 loops=1)

5. 0.076 0.076 ↓ 196.0 196 1

Seq Scan on organizations o (cost=0.00..6.30 rows=1 width=12) (actual time=0.017..0.076 rows=196 loops=1)

  • Filter: (cid = 235)
  • Rows Removed by Filter: 68
6. 2.352 2.352 ↓ 2.0 2 196

Index Scan using ukey_organization_contracts_name on organization_contracts oc (cost=0.28..8.32 rows=1 width=20) (actual time=0.009..0.012 rows=2 loops=196)

  • Index Cond: ((cid = 235) AND (organization_id = o.id))
  • Filter: (organization_contract_status_type_id = ANY ('{1,2}'::integer[]))
  • Rows Removed by Filter: 0
7. 1.056 1.760 ↓ 1.1 8 352

Bitmap Heap Scan on organization_contract_unit_spaces ocus (cost=4.36..28.89 rows=7 width=8) (actual time=0.003..0.005 rows=8 loops=352)

  • Recheck Cond: ((cid = 235) AND (organization_contract_id = oc.id))
  • Filter: (deleted_on IS NULL)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=359
8. 0.704 0.704 ↓ 1.1 9 352

Bitmap Index Scan on ca_organization_contract_unit_spaces_idx (cost=0.00..4.36 rows=8 width=0) (actual time=0.002..0.002 rows=9 loops=352)

  • Index Cond: ((cid = 235) AND (organization_contract_id = oc.id))
9. 5.722 5.722 ↑ 1.0 1 2,861

Index Scan using pk_lease_start_windows on lease_start_windows lsw (cost=0.29..8.31 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=2,861)

  • Index Cond: ((cid = 235) AND (id = oc.lease_start_window_id))
  • Filter: ((deleted_on IS NULL) AND (is_active IS TRUE))
10. 5.722 5.722 ↑ 1.0 1 2,861

Index Scan using pk_customers on customers c (cost=0.42..8.44 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=2,861)

  • Index Cond: ((cid = 235) AND (id = o.customer_id))