2

On my server with: MariaDB 10.4 PHP 7.4 Elasticsearch 7.9.1 Elasticsuite 2.10.0

I am trying to relaunch the full reindex for Magento2 but I have seen that catalog_category_product is very slow, its reindex time is 16 minutes (On my online server it is only 2 minutes). When the reindex arrives on catalogsearch_fulltext the system is even slower and seems to never end.

The question is: How can I increase the speed of the reindex? Do I need to increase some PHP or MySQL values or is the problem due to Elasticsearch?

1 Answer 1

5

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

https://devdocs.magento.com/guides/v2.4/performance-best-practices/configuration.html

Also, please refer this link for indexer optimization: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexer-batch.html

I hope it helps.

4
  • Good answer! But where is the file for edit this variables of MariaDB? Or how can i edit this setting? Thanks
    – Jackom
    May 7, 2021 at 9:38
  • 2
    Great man! I set the values ​​as you said and works perfectly! Thanks again :)
    – Jackom
    May 7, 2021 at 12:44
  • 1
    I'm happy to help :-) May 7, 2021 at 17:28
  • 1
    Holy crap, those settings took my reindexing process from 2-3 days to 13 minutes! Thanks!
    – Art Siv
    Oct 1, 2021 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.