26 private $resourceConnection;
49 $connection = $this->resourceConnection->getConnection();
54 $this->resourceConnection->getTableName(
'store_group'),
55 [
'count' => new \Zend_Db_Expr(
'count(*)')]
56 )->where(
'group_id > 0');
57 $storeGroupCount =
$connection->fetchOne($storeGroupSelect);
63 $this->resourceConnection->getTableName(
'catalog_category_product'),
64 [
'counter' => new \Zend_Db_Expr(
'count(category_id)')]
65 )->group(
'product_id');
70 [
'counters' => $categoryCounterSubSelect],
73 $maxProducts =
$connection->fetchOne($productCountSelect);
75 return ceil($storeGroupCount * $maxProducts * self::ROW_MEMORY_SIZE);
__construct(\Magento\Framework\App\ResourceConnection $resourceConnection)