QUERY PLAN
Sort (cost=2.57..2.58 rows=1 width=160)
Sort Key: eg.level, eg.sort
-> Group (cost=2.55..2.56 rows=1 width=160)
Group Key: eg.id
-> Sort (cost=2.55..2.56 rows=3 width=156)
Sort Key: eg.id
-> Hash Join (cost=1.04..2.53 rows=3 width=156)
Hash Cond: (egr.engineer_group_id = eg.id)
-> Seq Scan on tbl_engineer_group_relationships egr (cost=0.00..1.47 rows=6 width=4)
Filter: (engineer_id = ANY ('{5085,5248,1015,1022,5064,1023}'::integer[]))
-> Hash (cost=1.02..1.02 rows=1 width=156)
-> Seq Scan on tbl_engineer_groups eg (cost=0.00..1.02 rows=1 width=156)
Filter: (id <> 999999)