Magento drops the index tables and then rebuilds them.

Meanwhile, clients dependent on those tables are out of service.

E.g., if the catalog_product_flat index becomes invalidated or is in the process of rebuilding your frontend will almost entirely cease to function.

Why not rebuild table catalog_product_flat_1 as temp_catalog_product_flat_1?

When it's rebuilt, drop the old catalog_product_flat_1 and rename the temp version.

With tens or hundreds of thousands of products it can take 10 minutes just to rebuild that one index. To reindex all tables it can take more than 30 minutes. Why not implement my idea?

Any ideas?


Its not easy to put this into a temp table, as this would need to lock every change which results in a change to the index tables.

The Index tables support incremental updates, mean if you update a product, it can execute all updates on the index, so a complete re-index is not needed.

But for the big use-cases you have I suggest something other.

Deactivate the flat tables. Rework your caching on the front-end and add some more caching. (for example cache every product separate on your category page)

Also, use things like SOLR or ElasticSearch. With them and additional caching you get even better performance, as the flat tables could provide.

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.