QUERY PLAN
Sort (cost=70.47..70.49 rows=9 width=20)
Sort Key: tbl_departments."order"
-> Hash Join (cost=69.11..70.33 rows=9 width=20)
Hash Cond: (tbl_departments.id = tbl_users.department_id)
-> Seq Scan on tbl_departments (cost=0.00..1.09 rows=9 width=16)
-> Hash (cost=69.00..69.00 rows=9 width=4)
-> HashAggregate (cost=68.91..69.00 rows=9 width=4)
Group Key: tbl_users.department_id
-> Seq Scan on tbl_users (cost=60.54..68.70 rows=84 width=4)
Filter: ((user_status = '1'::type_global_user_status) OR (hashed SubPlan 1))
SubPlan 1
-> Seq Scan on tbl_approve_verify_rels (cost=0.00..60.54 rows=1 width=4)
Filter: (approve_id = 2752)