QUERY PLAN
Sort (cost=1.77..1.77 rows=1 width=12)
Sort Key: id DESC
-> Seq Scan on tbl_ledger_tickets (cost=0.00..1.76 rows=1 width=12)
Filter: ((ledger_id = 1) AND (status = 1) AND (type = 2) AND (settle_caption_id = 8))