Skip to content

Commit 1bc28f4

Browse files
author
Oleksandr Iegorov
committed
MC-41647: SKU Search very slow on Admin Panel
1 parent 94f2661 commit 1bc28f4

File tree

2 files changed

+4
-2
lines changed
  • app/code/Magento/CatalogSearch/Model/ResourceModel/Search
  • dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml

2 files changed

+4
-2
lines changed

app/code/Magento/CatalogSearch/Model/ResourceModel/Search/Collection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,14 @@ protected function _getSearchEntityIdsSql($query, $searchOnlyInCurrentStore = tr
303303
//force index statement not implemented in framework
304304
// phpcs:ignore Magento2.SQL.RawQuery
305305
$select = sprintf(
306-
'SELECT `t1`.`%s` FROM `%s` AS `t1` FORCE INDEX(%s) LEFT JOIN `%s` AS `t2`
306+
'SELECT `t1`.`%s` FROM `%s` AS `t1` FORCE INDEX(%s)
307+
LEFT JOIN `%s` AS `t2` FORCE INDEX(%s)
307308
ON %s WHERE %s AND %s AND (%s)',
308309
$linkField,
309310
$table,
310311
$preparedIndexEnforcements[$table],
311312
$table,
313+
$preparedIndexEnforcements[$table],
312314
$joinCondition,
313315
$condition1,
314316
$condition2,

dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/IndexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* @magentoAppArea adminhtml
12-
* @magentoDbIsolation disabled
12+
* @magentoDbIsolation enabled
1313
*/
1414
class IndexTest extends \Magento\TestFramework\TestCase\AbstractBackendController
1515
{

0 commit comments

Comments
 (0)