QUERY PLAN
Sort (cost=9.70..9.71 rows=1 width=10)
Sort Key: d."order"
-> Group (cost=9.68..9.69 rows=1 width=10)
Group Key: u.id, d.id
-> Sort (cost=9.68..9.69 rows=1 width=10)
Sort Key: u.id, d.id
-> Nested Loop Left Join (cost=0.00..9.67 rows=1 width=10)
Join Filter: (u.department_id = d.id)
-> Seq Scan on tbl_users u (cost=0.00..8.47 rows=1 width=8)
Filter: ((user_status = '1'::type_global_user_status) AND ((id = 1011) OR (id = 5446)))
-> Seq Scan on tbl_departments d (cost=0.00..1.09 rows=9 width=6)