QUERY PLAN
Sort (cost=20.32..20.34 rows=9 width=156)
Sort Key: tbl_departments."order"
-> Hash Join (cost=18.96..20.18 rows=9 width=156)
Hash Cond: (tbl_departments.id = tbl_users.department_id)
-> Seq Scan on tbl_departments (cost=0.00..1.09 rows=9 width=152)
-> Hash (cost=18.85..18.85 rows=9 width=4)
-> HashAggregate (cost=18.76..18.85 rows=9 width=4)
Group Key: tbl_users.department_id
-> Seq Scan on tbl_users (cost=1.39..18.55 rows=84 width=4)
Filter: ((user_status = '1'::type_global_user_status) OR (hashed SubPlan 1))
SubPlan 1
-> Seq Scan on tbl_punch_travel_verify_rels (cost=0.00..1.39 rows=1 width=4)
Filter: (punch_travel_id = 42)