Skip to content

Commit 7535e65

Browse files
author
Stanislav Idolov
committed
MAGETWO-44449: Quote_id_mask table is a bottleneck under high load
1 parent d6499ed commit 7535e65

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Quote\Setup;
7+
8+
use Magento\Framework\Setup\UpgradeSchemaInterface;
9+
use Magento\Framework\Setup\ModuleContextInterface;
10+
use Magento\Framework\Setup\SchemaSetupInterface;
11+
12+
/**
13+
* Upgrade the Catalog module DB scheme
14+
*/
15+
class UpgradeSchema implements UpgradeSchemaInterface
16+
{
17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
21+
{
22+
$setup->startSetup();
23+
24+
if (version_compare($context->getVersion(), '2.0.1', '<')) {
25+
$setup->getConnection()->addIndex(
26+
$setup->getTable('quote_id_mask'),
27+
$setup->getIdxName('quote_id_mask', ['masked_id']),
28+
['masked_id']
29+
);
30+
}
31+
32+
$setup->endSetup();
33+
}
34+
}

app/code/Magento/Quote/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Quote" setup_version="2.0.0">
9+
<module name="Magento_Quote" setup_version="2.0.1">
1010
</module>
1111
</config>

0 commit comments

Comments
 (0)