Magento 2.4.2-p1 索引问题

Magento 2.4.2-p1 Indexing issue

您好,我们已将我们的商店从 Magento 2.2.5 迁移到 Magento 2.4.1-p1。我们面临的问题是索引完成时间过长类别产品索引 需要 2 到 3 个小时才能完成。以前在 Magento 2.2.5 中只需 15 分钟即可完成。目前搜索引擎是 Elastic Search

从 Maria DB 10.4 开始,Magento 索引存在问题。您需要在默认 MariaDB 配置下更改以下设置。

optimizer_switch='rowid_filter=off'

optimizer_use_condition_selectivity = 1

它也在 Magento 中指定 documentation

Reindexing on MariaDB 10.4 takes more time compared to other MariaDB or MySQL versions. As a workaround, we suggest modifying the default MariaDB configuration and setting the following parameters:

optimizer_switch='rowid_filter=off'

optimizer_use_condition_selectivity = 1