QUERY PLAN
Limit (cost=19.51..19.52 rows=1 width=99)
-> Sort (cost=19.51..19.52 rows=1 width=99)
Sort Key: r.created_at DESC
-> Group (cost=19.50..19.50 rows=1 width=99)
Group Key: r.id
-> Sort (cost=19.50..19.50 rows=1 width=99)
Sort Key: r.id
-> Nested Loop Left Join (cost=13.29..19.48 rows=1 width=99)
Join Filter: (crvr.punch_repair_id = r.id)
-> Hash Right Join (cost=13.29..18.39 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=13.28..13.28 rows=1 width=99)
-> Hash Join (cost=6.18..13.28 rows=1 width=99)
Hash Cond: (r.id = rccr.punch_repair_id)
-> Seq Scan on tbl_punch_repairs r (cost=0.00..6.25 rows=225 width=99)
-> Hash (cost=6.16..6.16 rows=1 width=4)
-> Seq Scan on tbl_punch_repair_carbon_copy_rels rccr (cost=0.00..6.16 rows=1 width=4)
Filter: (user_id = 1000)
-> Seq Scan on tbl_punch_repair_cancel_verify_rels crvr (cost=0.00..1.04 rows=4 width=4)