QUERY PLAN
Aggregate (cost=89.55..89.56 rows=1 width=48)
-> Unique (cost=89.46..89.51 rows=1 width=207)
-> Sort (cost=89.46..89.46 rows=1 width=207)
Sort Key: r.id, r.title, r.status, r.overtime_start, r.overtime_end, r.next_verify_user, r.verify_at, r.next_cancel_verify_user, r.cancel_at, r.description, r.refuse_description, r.is_resubmited, r.created_by, r.created_at, r.updated_at, r.cancel_description, r.minutes, r.client_id, r.project_id
-> HashAggregate (cost=89.44..89.45 rows=1 width=207)
Group Key: r.id
-> Hash Join (cost=37.67..65.19 rows=9700 width=207)
Hash Cond: (r.id = rccr.punch_overtime_id)
-> Hash Right Join (cost=2.05..25.43 rows=970 width=207)
Hash Cond: (crvr.punch_overtime_id = r.id)
-> Seq Scan on tbl_punch_overtime_cancel_verify_rels crvr (cost=0.00..19.70 rows=970 width=4)
-> Hash (cost=2.03..2.03 rows=1 width=207)
-> Nested Loop Left Join (cost=0.00..2.03 rows=1 width=207)
Join Filter: (rvr.punch_overtime_id = r.id)
-> Seq Scan on tbl_punch_overtimes r (cost=0.00..1.01 rows=1 width=207)
-> Seq Scan on tbl_punch_overtime_verify_rels rvr (cost=0.00..1.01 rows=1 width=4)
-> Hash (cost=35.50..35.50 rows=10 width=4)
-> Seq Scan on tbl_punch_overtime_carbon_copy_rels rccr (cost=0.00..35.50 rows=10 width=4)
Filter: (user_id = 1000)