explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kMUa

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

Limit (cost=2,298.54..2,298.57 rows=1 width=132) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=2,298.54..2,298.57 rows=1 width=132) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=2,298.54..2,298.55 rows=1 width=132) (actual rows= loops=)

  • Sort Key: prop.proposal_no, prop.id, prop.lessee_id, prop.party_name, prop.res_mobile, prop.agreement_date, (CASE WHEN ((sum(day_collections_dtl.emi)) IS NOT NULL) THEN CASE WHEN ((prop.emi - (sum(day_collections_dtl.emi))) < '0'::numeric) THEN '0'::numeric ELSE (prop.emi - (sum(day_collections_dtl.emi))) END ELSE prop.emi END), (CASE WHEN ((sum(day_collections_dtl.emi)) IS NOT NULL) THEN ((prop.inst_over_due)::numeric(16,2) - ((sum((day_collections_dtl.inst_over_due)::numeric(16,2))))::numeric(16,2)) ELSE (prop.inst_over_due)::numeric(16,2) END), prop.inst_due_date, prop.branch_code
4. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1,398.38..2,298.53 rows=1 width=132) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,397.95..2,289.99 rows=1 width=140) (actual rows= loops=)

  • Join Filter: ((day_collections_dtl.proposal_no)::text = (prop.proposal_no)::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using collection_unit_id_index on proposals prop (cost=0.43..884.55 rows=1 width=76) (actual rows= loops=)

  • Index Cond: (collection_unit_id = 114701)
  • Filter: (((case_status_code)::text <> 'O'::text) AND ((npa_stage_id)::text <> 'REPO'::text) AND ((status)::text = 'A'::text) AND (lower((proposal_no)::text) ~~ '%l2wdin%'::text))
7. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,397.52..1,401.31 rows=66 width=83) (actual rows= loops=)

  • Group Key: day_collections_dtl.proposal_no, (date(day_collections_dtl.collection_dtm))
8. 0.000 0.000 ↓ 0.0

Sort (cost=1,397.52..1,397.68 rows=66 width=27) (actual rows= loops=)

  • Sort Key: day_collections_dtl.proposal_no
9. 0.000 0.000 ↓ 0.0

Seq Scan on day_collections_dtl (cost=0.00..1,395.53 rows=66 width=27) (actual rows= loops=)

  • Filter: (date(collection_dtm) = ('now'::cstring)::date)
10. 0.000 0.000 ↓ 0.0

Index Scan using asset_proposal_no_index on proposal_assets (cost=0.43..4.48 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((proposal_no)::text = (prop.proposal_no)::text)
  • Filter: (lower((reg_no)::text) ~~ '%57bc3620%'::text)