Posted on 12/09/2024 09:44:58
Thanks Nicolai.
In my case, SELECT ProductAutoId FROM EcomProducts WHERE ProductLanguageId = 'en' AND ProductNumber IN ('Bla', 'Something') is fine. It gives me exactly the two products I need and with an index on ProductNumber that's probably as fast as it gets.
My use case is a custom web API where I need to fetch prices from Live Integration. I have code like this:
var products = GetProducts(...);
PrepareProductInfoProvider.FetchProductInfos(products, user);
products.ForEach(product => PrepareProductInfoProvider.FillProductValues(product, user));
My GetProducts methods gets the products from the Ecom ProductService and then I feed them into LI. So I don't think the index will help me here, and I need to get the products directly somehow. GetByAutoIDs seems to do what I need in this scenario.
Imar