Skip to content

Commit 00bd24c

Browse files
committed
MAGETWO-86046: [Performance] Temp table temp_catalog_category_tree_index has no indexes for the columns parent_id and child_id
1 parent 5afa7d3 commit 00bd24c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,12 @@ protected function makeTempCategoryTreeIndex()
608608
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_PRIMARY]
609609
);
610610

611+
$temporaryTable->addIndex(
612+
'child_id',
613+
['child_id'],
614+
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX]
615+
);
616+
611617
// Drop the temporary table in case it already exists on this (persistent?) connection.
612618
$this->connection->dropTemporaryTable($temporaryName);
613619
$this->connection->createTemporaryTable($temporaryTable);

0 commit comments

Comments
 (0)