Skip to content

Commit 5f6dfc2

Browse files
committed
ACP2E-2673: Price partial indexing performance
- test with truncate instead of drop
1 parent 067852b commit 5f6dfc2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,10 @@ function ($type) use ($productsTypes) {
412412
$mainTable = $this->tableMaintainer->getMainTableByDimensions($dimensions);
413413
$this->_insertFromTable($temporaryTable, $mainTable);
414414
$this->deleteOutdatedData($entityIds, $temporaryTable, $mainTable);
415-
$this->_connection->dropTable($temporaryTable);
415+
// phpcs:ignore Magento2.SQL.RawQuery.FoundRawSql
416+
$this->getConnection()->query(
417+
'TRUNCATE TABLE ' . $this->getConnection()->quoteIdentifier($temporaryTable)
418+
);
416419
}
417420
} else {
418421
// handle 3d-party indexers for backward compatibility

0 commit comments

Comments
 (0)