QUERY PLAN
Sort (cost=8.18..8.18 rows=1 width=497)
Sort Key: id
-> Index Scan using idx_tbl_ledger_banks_ledger_id on tbl_ledger_banks (cost=0.14..8.17 rows=1 width=497)
Index Cond: (ledger_id = 1)
Filter: ((erp_bank_id IS NULL) AND (type = 0) AND ((serial_no)::text = '100202'::text))