QUERY PLAN
Sort (cost=2.66..2.66 rows=2 width=158)
Sort Key: eg.sort
-> HashAggregate (cost=2.63..2.65 rows=2 width=158)
Group Key: eg.id
-> Hash Join (cost=1.04..2.61 rows=8 width=154)
Hash Cond: (egr.engineer_group_id = eg.id)
-> Seq Scan on tbl_engineer_group_relationships egr (cost=0.00..1.54 rows=8 width=4)
Filter: (engineer_id = ANY ('{1017,5085,1001,5248,1015,1022,5296,1023}'::integer[]))
-> Hash (cost=1.02..1.02 rows=2 width=154)
-> Seq Scan on tbl_engineer_groups eg (cost=0.00..1.02 rows=2 width=154)