ACSD-53347: Price indexing performance gradually degrades overtime

The ACSD-53347 patch fixes the issue where performance gradually degrades when reindexing prices for a large product catalog. This patch is available when the Quality Patches Tool (QPT) 1.1.38 is installed. The patch ID is ACSD-53347. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.3.7 - 2.4.6-p2
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

When reindexing prices for a large product catalog, the performance of the queries executed during the indexing process gradually degrades.

Steps to reproduce:

  1. Create a large simple catalog and assign custom options to these products (custom options use a temporary table during indexing).
  2. Create at least 200 or more customer groups to increase visibility of the issue.
  3. Create ten or more websites and assign all products to each of them.
  4. Note that the imported products are almost identical, differing only by SKU and name.
  5. Enable DB Logging.
  6. Execute the bin/magento index:reindex catalog_product_price command.
  7. Check for DELETE FROM catalog_product_index_price_opt_agr_temp in the db.log.

Expected results:

The execution of the DB queries runs efficiently.

Actual results:

The performance of the DB queries on temporary tables become slow overtime, hence price indexing table takes a lot of time to complete.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a