QUERY PLAN
Limit (cost=13.36..13.36 rows=1 width=99)
-> Sort (cost=13.36..13.36 rows=1 width=99)
Sort Key: r.created_at DESC
-> Group (cost=13.34..13.35 rows=1 width=99)
Group Key: r.id
-> Sort (cost=13.34..13.34 rows=1 width=99)
Sort Key: r.id
-> Nested Loop Left Join (cost=7.39..13.33 rows=1 width=99)
Join Filter: (crvr.punch_repair_id = r.id)
-> Hash Right Join (cost=7.39..12.24 rows=1 width=99)
Hash Cond: (rvr.punch_repair_id = r.id)
-> Seq Scan on tbl_punch_repair_verify_rels rvr (cost=0.00..4.25 rows=225 width=4)
-> Hash (cost=7.38..7.38 rows=1 width=99)
-> Seq Scan on tbl_punch_repairs r (cost=0.00..7.38 rows=1 width=99)
Filter: ((created_by = 1000) AND (day_at = '2025-06-27'::date))
-> Seq Scan on tbl_punch_repair_cancel_verify_rels crvr (cost=0.00..1.04 rows=4 width=4)