QUERY PLAN
HashAggregate (cost=30.48..32.47 rows=38 width=548)
Group Key: eip.product_id
-> Hash Join (cost=1.03..28.58 rows=38 width=88)
Hash Cond: (eip.erp_store_id = saleable_store.id)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..26.92 rows=77 width=92)
Filter: (product_id = ANY ('{1671,1275,2171,2257,2232,2258,2259,2260,867,870,2269,1372,2261,2262,1584,1558,1562,868,2177}'::integer[]))
-> Hash (cost=1.02..1.02 rows=1 width=4)
-> Seq Scan on tbl_erp_stores saleable_store (cost=0.00..1.02 rows=1 width=4)
Filter: ((NOT is_delete) AND is_saleable_inventory)