diff --git a/vendor/magento/module-indexer/etc/crontab.xml b/vendor/magento/module-indexer/etc/crontab.xml index 2984f47912f45..a0248a0b3b173 100644 --- a/vendor/magento/module-indexer/etc/crontab.xml +++ b/vendor/magento/module-indexer/etc/crontab.xml @@ -1,8 +1,8 @@ @@ -14,7 +14,7 @@ * * * * * - 0 * * * * + */5 * * * * diff --git a/vendor/magento/framework/Mview/View/Changelog.php b/vendor/magento/framework/Mview/View/Changelog.php index c7529a69d2fc6..e2e38d98d1d57 100644 --- a/vendor/magento/framework/Mview/View/Changelog.php +++ b/vendor/magento/framework/Mview/View/Changelog.php @@ -1,14 +1,13 @@ connection = $resource->getConnection(); $this->resource = $resource; @@ -191,7 +197,16 @@ public function clear($versionId) throw new ChangelogTableNotExistsException(new Phrase("Table %1 does not exist", [$changelogTableName])); } - $this->connection->delete($changelogTableName, ['version_id < ?' => (int)$versionId]); + + $query = sprintf( + 'DELETE FROM `%s` WHERE %s LIMIT %d', + $changelogTableName, + 'version_id < ' . (int) $versionId, + $this->batchSize + ); + do { + $stmt = $this->connection->query($query); + } while ($stmt->rowCount()); return true; }