| Aggregate (cost=16.68..16.69 rows=1 width=8) |
| -> Sort (cost=16.43..16.47 rows=17 width=307) |
| Sort Key: (CASE WHEN (r.status = ANY ('{1,5}'::integer[])) THEN 0 ELSE 1 END), r.created_at DESC |
| -> HashAggregate (cost=15.87..16.08 rows=17 width=307) |
| Group Key: r.id |
| -> Hash Left Join (cost=11.63..15.82 rows=17 width=14) |
| Hash Cond: (r.id = crvr.punch_leave_id) |
| -> Hash Right Join (cost=10.25..14.36 rows=17 width=14) |
| Hash Cond: (rvr.punch_leave_id = r.id) |
| -> Seq Scan on tbl_punch_leave_verify_rels rvr (cost=0.00..3.66 rows=166 width=4) |
| -> Hash (cost=10.04..10.04 rows=17 width=18) |
| -> Seq Scan on tbl_punch_leaves r (cost=0.00..10.04 rows=17 width=18) |
| Filter: (created_by = 1000) |
| -> Hash (cost=1.17..1.17 rows=17 width=4) |
| -> Seq Scan on tbl_punch_leave_cancel_verify_rels crvr (cost=0.00..1.17 rows=17 width=4) |