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