QUERY PLAN
Sort (cost=4.83..4.83 rows=1 width=132)
Sort Key: verify_at DESC
-> Seq Scan on tbl_punch_leaves (cost=0.00..4.82 rows=1 width=132)
Filter: ((status = ANY ('{2,5}'::integer[])) AND (created_by = 1000) AND (((leave_start < '2025-06-27'::date) AND (leave_end > '2025-06-27'::date)) OR ((leave_start = '2025-06-27'::date) AND (leave_start_type = 1)) OR ((leave_start <> '2025-06-27'::date) AND (leave_end = '2025-06-27'::date))))