Hi
In DW 9.7.2 ProductIndexBuilder there is a small problem with the bulk size handling, this query runs for every batch of products indexed, but the TOP 500 and WHERE ProductAutoId > {CurrentAutoId} is declared before the ORDER BY ProductAutoId and there for it is random how many products you end up with, in the index.
For now we can get around the problem by setting BulkSize to int.maxvalue.
SELECT productautoid,
*
FROM (SELECT TOP 500 *
FROM ecomproducts
WHERE productexcludefromindex = 0
AND productactive = 1
AND productautoid > 0
AND productid IN (SELECT gpr.groupproductrelationproductid
FROM ecomgroupproductrelation gpr
LEFT JOIN ecomgroups g
ON gpr.groupproductrelationgroupid =
g.groupid
LEFT JOIN ecomshopgrouprelation sgr
ON g.groupid = sgr.shopgroupgroupid
WHERE sgr.shopgroupshopid = @p0)) AS Products
LEFT JOIN ecomproductcategoryfieldvalue
ON productid = fieldvalueproductid
AND productvariantid = fieldvalueproductvariantid
AND productlanguageid = fieldvalueproductlanguageid
ORDER BY Products.productautoid
*
FROM (SELECT TOP 500 *
FROM ecomproducts
WHERE productexcludefromindex = 0
AND productactive = 1
AND productautoid > 0
AND productid IN (SELECT gpr.groupproductrelationproductid
FROM ecomgroupproductrelation gpr
LEFT JOIN ecomgroups g
ON gpr.groupproductrelationgroupid =
g.groupid
LEFT JOIN ecomshopgrouprelation sgr
ON g.groupid = sgr.shopgroupgroupid
WHERE sgr.shopgroupshopid = @p0)) AS Products
LEFT JOIN ecomproductcategoryfieldvalue
ON productid = fieldvalueproductid
AND productvariantid = fieldvalueproductvariantid
AND productlanguageid = fieldvalueproductlanguageid
ORDER BY Products.productautoid