QUERY PLAN
Aggregate (cost=8.19..8.20 rows=1 width=8)
-> Sort (cost=8.17..8.18 rows=1 width=430)
Sort Key: tbl_ledger_cash_items.is_delete, tbl_ledger_cash_items.serial_no, tbl_ledger_cash_items.sort, tbl_ledger_cash_items.id
-> Index Scan using idx_tbl_ledger_cash_items_ledger_id on tbl_ledger_cash_items (cost=0.14..8.16 rows=1 width=430)
Index Cond: (ledger_id = 1)
Filter: (parent_id IS NULL)