QUERY PLAN
Sort (cost=108.13..108.13 rows=1 width=465)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_sales_orders (cost=0.00..108.12 rows=1 width=465)
Filter: ((created_at >= '2026-06-02 00:00:00+08'::timestamp with time zone) AND (created_at <= '2026-06-02 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%XSDD-20260602-%'::text) AND (length((serial_no)::text) = 19))