QUERY PLAN
Sort (cost=14.37..14.38 rows=3 width=33)
Sort Key: end_date DESC, date DESC
-> Bitmap Heap Scan on tbl_ledger_settles (cost=4.21..14.35 rows=3 width=33)
Recheck Cond: (ledger_id = 1)
Filter: is_settle
-> Bitmap Index Scan on idx_tbl_ledger_settles_ledger_id (cost=0.00..4.21 rows=7 width=0)
Index Cond: (ledger_id = 1)