cancel
Showing results for 
Search instead for 
Did you mean: 

Incremental index synchronization instead of full reindex in Magento 2

Incremental index synchronization instead of full reindex in Magento 2

Basically Magento 2 has reindex functionality through php bin/magento indexer:reindex. We are going to have millions of products, so full reindex would be very slow for us. We disabled index update after every single product import. We do import via plain SQL inserts outside Magento 2 Bootstrap. My question is - is it possible to have an incremental index synchronization instead of full reindex. Thanks in advance.

1 REPLY 1

Re: Incremental index synchronization instead of full reindex in Magento 2


@sergheitopf5c5 wrote:

Basically Magento 2 has reindex functionality through php bin/magento indexer:reindex. We are going to have millions of products, so full reindex would be very slow for us. We disabled index update after every single product import. We do import via plain SQL inserts outside Magento 2 Bootstrap. Dog Likes Best My question is - is it possible to have an incremental index synchronization instead of full reindex. Thanks in advance.


According to my web search results, the answer is yes, it is possible to have an incremental index synchronization instead of a full reindex in Magento 2.

The most logical solution would be to use the Index on Schedule method, which creates MySQL triggers to detect changes made to catalog_product_entity tables. This way, Magento will automatically reindex what is needed based on the changes you make.

However, you should also be aware of the potential issue of locks, which may occur if your import is still running while Magento tries to reindex. 

You should therefore disable the indexation process while you are importing and enable it again once the import is finished. You can achieve this either by completely stopping the cross or with a plugin on Magento\Indexer\Model\Indexer to prevent it from being executed.