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


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_use_condition_selectivity = 1


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.

  • 1
    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
  • 3
    Holy crap, those settings took my reindexing process from 2-3 days to 13 minutes! Thanks!
    – Art Siv
    Oct 1, 2021 at 16:44
  • 1
    Big thank you for this was taking me hours to complete reindex and now 10 - 15 mins
    – jt9489
    Aug 29, 2022 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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