QUERY PLAN
Sort (cost=11.30..11.30 rows=2 width=10)
Sort Key: d."order"
-> Group (cost=11.27..11.29 rows=2 width=10)
Group Key: u.id, d.id
-> Sort (cost=11.27..11.28 rows=2 width=10)
Sort Key: u.id, d.id
-> Hash Left Join (cost=1.20..11.26 rows=2 width=10)
Hash Cond: (u.department_id = d.id)
-> Seq Scan on tbl_users u (cost=0.00..10.05 rows=2 width=8)
Filter: ((user_status = '1'::type_global_user_status) AND ((id = ANY ('{5360,5311,1011,1011}'::integer[])) OR (id = ANY ('{5252,1023,5413,5298,5360,1022,5015,5445,5023}'::integer[]))))
-> Hash (cost=1.09..1.09 rows=9 width=6)
-> Seq Scan on tbl_departments d (cost=0.00..1.09 rows=9 width=6)