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