QUERY PLAN
Result (cost=9.53..9.54 rows=1 width=4)
InitPlan 1 (returns $0)
-> Limit (cost=0.15..9.53 rows=1 width=4)
-> Index Scan Backward using idx_tbl_ledger_settles_ledger_month on tbl_ledger_settles (cost=0.15..28.29 rows=3 width=4)
Index Cond: ((ledger_id = 1) AND (date IS NOT NULL))
Filter: is_settle