QUERY PLAN
Aggregate (cost=27.97..27.98 rows=1 width=48)
-> Unique (cost=27.88..27.93 rows=1 width=207)
-> Sort (cost=27.88..27.89 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_at, r.updated_at, r.cancel_description, r.minutes, r.client_id, r.project_id
-> HashAggregate (cost=27.86..27.87 rows=1 width=207)
Group Key: r.id
-> Hash Right Join (cost=2.05..25.44 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.04..2.04 rows=1 width=207)
-> Nested Loop Left Join (cost=0.00..2.04 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)
Filter: (created_by = 1000)
-> Seq Scan on tbl_punch_overtime_verify_rels rvr (cost=0.00..1.01 rows=1 width=4)