explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4VIT : Optimization for: plan #EQli

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Seq Scan on ar_transactions (cost=23.59..855,573.28 rows=10 width=272) (actual rows= loops=)

  • Filter: (id = ANY ((string_to_array($2, ','::text))::integer[]))
2.          

Initplan (forSeq Scan)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=15.24..23.59 rows=1 width=32) (actual rows= loops=)

  • Join Filter: ((at.cid = artt.cid) AND (at.property_id = artt.property_id) AND (at.lease_id = artt.lease_id) AND (at.post_date = artt.post_date))
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=14.68..20.97 rows=1 width=20) (actual rows= loops=)

  • Join Filter: ((at.cid = at.cid) AND (at.property_id = art.property_id) AND (at.lease_id = art.lease_id) AND (art.ar_transaction_id = at.id))
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..6.37 rows=1 width=20) (actual rows= loops=)

  • Join Filter: (at.transaction_amount = shr.assistance_payment_amount)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.11 rows=1 width=37) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan Backward using idx_ar_transactions_allocations_join on ar_transactions at (cost=0.56..2.59 rows=1 width=25) (actual rows= loops=)

  • Index Cond: ((cid = 235) AND (property_id = 613890) AND (lease_id = 14788686))
  • Filter: ((post_date >= '2019-03-01'::date) AND (post_date < '2019-04-01'::date) AND (ar_code_type_id = 2))
8. 0.000 0.000 ↓ 0.0

Index Only Scan using uk_subsidy_hap_request_ar_transactions_name on subsidy_hap_request_ar_transactions shrat (cost=0.28..2.51 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((cid = 235) AND (property_id = 613890) AND (ar_transaction_id = at.id))
9. 0.000 0.000 ↓ 0.0

Index Scan using pk_subsidy_hap_requests on subsidy_hap_requests shr (cost=0.28..1.24 rows=1 width=15) (actual rows= loops=)

  • Index Cond: ((cid = 235) AND (id = shrat.subsidy_hap_request_id))
  • Filter: (property_id = 613890)
10. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ar_transactions art (cost=13.57..14.58 rows=1 width=16) (actual rows= loops=)

  • Recheck Cond: ((lease_id = 14788686) AND (property_id = 613890))
  • Filter: (transaction_amount < '0'::numeric)
11. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=13.57..13.57 rows=1 width=0) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_ar_transactions_lease_id (cost=0.00..2.42 rows=131 width=0) (actual rows= loops=)

  • Index Cond: (lease_id = 14788686)
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_ar_transactions_property_id (cost=0.00..10.90 rows=995 width=0) (actual rows= loops=)

  • Index Cond: (property_id = 613890)
14. 0.000 0.000 ↓ 0.0

Index Scan Backward using idx_ar_transactions_allocations_join on ar_transactions artt (cost=0.56..2.59 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((cid = 235) AND (property_id = 613890) AND (lease_id = 14788686))