QUERY PLAN
Result (cost=0.66..0.68 rows=1 width=4)
InitPlan 1 (returns $0)
-> Limit (cost=0.14..0.66 rows=1 width=4)
-> Index Only Scan Backward using idx_tbl_ledger_tickets_serial_group on tbl_ledger_tickets (cost=0.14..12.74 rows=24 width=4)
Index Cond: ((ledger_id = 1) AND (ticket_date = '2026-05-31'::date) AND (ticket_word = 3) AND (serial_no IS NOT NULL))