Question

Is it possible to truncate catalog_product_index_price without causing problems to the actual products?

Was it helpful?

Solution

Yes you can, but be sure before performing this tasks. You can run "php bin/magento indexer:reindex" command, also refer this link:

https://devdocs.magento.com/guides/v2.3/extension-dev-guide/indexer-batch.html

Magento optimizes certain indexer processes to prevent deadlocks and wait locks caused by read/write collisions on the same table. In these cases, Magento uses separate tables for performing read operations and reindexing. As a result of this table switching process, customers are not impacted when you run a full reindex. For example, when catalog_product_price is reindexing, customers won’t be slowed down as they navigate on Categories pages, search products, or user layer navigation filters with price filters.


OTHER TIPS

A really good topic to discuss on... I think it depends on the number of products, there were issues in the past. But not sure about right now.

Anyone wants to put their points or share any experiences?

Anyways, I was following the great discussion on GitHub and Stack Overflow. Maybe you would find anything relevant.

https://github.com/magento/magento2/issues/6415 https://stackoverflow.com/questions/12205714/list-of-tables-to-safely-truncate-in-magento

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top