QUERY PLAN
Sort (cost=9.35..9.35 rows=1 width=10)
Sort Key: d."order"
-> Group (cost=9.33..9.34 rows=1 width=10)
Group Key: u.id, d.id
-> Sort (cost=9.33..9.33 rows=1 width=10)
Sort Key: d.id
-> Nested Loop Left Join (cost=0.00..9.32 rows=1 width=10)
Join Filter: (u.department_id = d.id)
-> Seq Scan on tbl_users u (cost=0.00..8.12 rows=1 width=8)
Filter: ((user_status = '1'::type_global_user_status) AND (id = 5446))
-> Seq Scan on tbl_departments d (cost=0.00..1.09 rows=9 width=6)