QUERY PLAN
GroupAggregate (cost=17.73..18.16 rows=4 width=548)
Group Key: eip.product_id
-> Sort (cost=17.73..17.75 rows=4 width=60)
Sort Key: eip.product_id
-> Nested Loop (cost=0.00..17.70 rows=4 width=60)
Join Filter: (eip.erp_store_id = saleable_store.id)
-> 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)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..16.56 rows=9 width=64)
Filter: (product_id = ANY ('{2232,870,868}'::integer[]))