Magento Reindexing Data - Risks

瘦欲@ 提交于 2020-01-14 19:21:13

问题


I have a Magento site in which the cross-selling products do not seem to be appearing.

After looking on Stack and Google it seems that 'reindexing the data' has solved this issue for a lot of individuals.

My question is, are there any risks associated with performing this task? Or is it a relatively straight forward procedure?


回答1:


Indexing is a fundamental part of Magento and will not effect your site in a negative way.

Magento uses a complex EAV (entity-attribute-value) database structure that can sometimes require heavy database queries to retrieve simple results. Because of this, the Magento developers have implemeted Index tables that query all of this data, and store it into a single table structure. This allows Magento to quickly query the single Index table, rather than making complex joins across multiple tables.

With that being said, Reindexing does not alter your existing data. It simply queries your existing data and copies it to it's own tables.

To reindex your site, you can simple go to System > Index Management, check off all the indexes that you wish to reindex, then submit.

If you have a large set of products, I recommend reindexing your site from the shell command line.

  1. Login to your site using an SSH program (such as Putty)
  2. Once logged in, cd to your magento/shell/ (where magento is your Magento root directory)
  3. Run the following command to reindex your site: php indexer.php reindexall
  4. Wait for the index processes to complete.

Lastly, ensure that your Catalog is using the Flat index tables. To do this:

  1. Go to System > Configuration > Catalog > Frontend (section)
  2. Set Use Flat Catalog Category to Yes
  3. Set Use Flat Catalog Product to Yes
  4. Click Save Config



回答2:


No, you're safe to reindex whenever you see the notice appear.

If you know you're going to make a lot of changes, you can wait until you're done, saving yourself some time but only running it once at the end.

The only exception where this is not safe is if you have tens of thousands of products and/or lots of store views. It may end up running for hours and hours, slowing down your site leading to an undesirable experience for the customer.




回答3:


I have found on sites with a large number of products, running the price reindex can cause a database lock, which can cause certain actions to be unavailable and for orders to be duplicated during that time. It also can affect performance and eat resources. I recommend performing this late at night only if possible.



来源:https://stackoverflow.com/questions/19518136/magento-reindexing-data-risks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!