Why You Should Manually Index Your Magento Store

Indexing Recommendations for Community Edition You want to add/update/delete new products to your Magento store, except there a few issues: When you actually make the changes in the Magento admin, it can take a very long time to save. If you have external systems make updates through the API the time delays can result in […]

By Jill Govier

Why You Should Manually Index Your Magento Store

Indexing Recommendations for Community Edition

You want to add/update/delete new products to your Magento store, except there a few issues: When you actually make the changes in the Magento admin, it can take a very long time to save. If you have external systems make updates through the API the time delays can result in the update process aborting. And when an update process is aborted in the middle – this can cause data to be corrupted the next time it attempts to make updates. But most importantly, when an update is made the customers are impacted. As an index is updated, any attempt to view a page that depends on that index will be locked and cannot complete until the index finishes. In other cases, when multiple indexes are used for a single page, products can ‘disappear’ from the page until all the indexes are updated.

What is indexing?

Indexing has 2 purposes. There are required indexes and there are optional indexes. If you are using SEO friendly urls, there is a required index which contains a list of all the friendly urls and what product or category that should be loaded. Optional indexes are used to speed up your site. For example, the flat product index is a list of all the products and contains all the various attribute values for those products in a single record. This includes things like price and name – and also less intuitive things like inventory.

For each of these indexes, you can configure them to be updated manually or automatically. Indexes that are updated automatically will be regenerated every time the data that they rely on is changed. Indexes that are updated manually will only be regenerated at specific times. Note that keyword: regenerated! To update is to change just the information which has changed. Regenerate means to recreate every record! This means that if you have an external inventory management service and it updates the inventory randomly throughout the day when it changes – then randomly throughout the day an index will be locked for a few seconds and all your customers have to wait to view products. For new sites, these updates run very quickly[under 100 milliseconds] and are not noticeable. As your site grows in complexity and number of products, this delay increases and there is a lack of reporting on why performance has gotten worse.

Why should I manually index?

Predictability and Performance. By performing indexes at fixed times, you know precisely when there will be an impact. You can schedule that indexing based on your business needs and site usage. If you have few visitors at 9am, 1pm and 4pm that is a perfect time to reindex. If you know that your site received a large number of product updates between 11am and 1pm from your warehousing system, run the index at 2pm instead. Indexes are only used for the listing and display of products – not for ordering. When a product is ordered, Magento goes to the absolute source of information to check availability, pricing and inventory. So manually indexing your products will not result in allowing products which should not be ordered to be ordered. By setting a schedule, you will also know when to expect a site slowdown so it is easier to determine performance issues due to indexing and issues due to something else. If you run your index at 2pm, then if the site is running slowly at 3:30PM you can rule out the index. Whereas if it becomes unreasonably slow at 2:10pm then you know it is time to take more aggressive action to make indexing run faster.

Follow these steps to manually index in the admin:

  1. Navigate to System > Index Management
  2. Check all the items on the left side
  3. Change the action to “Change Index Mode”
  4. Select the option, “Manual”
  5. Save

Improving Indexing Performance

The Enterprise Edition of Magento includes some performance enhancements for indexing. Remember when we said the entire index will be locked and regenerated? EE performs indexing in what is called an “asynchronous” manner. That means that only the specific products that were updated will have their index entrees updated – allowing everything else to continue to function and running much faster.

In addition, there are a wide number of extensions which can be installed on Community Edition which perform similar functions. Not all such extensions are created equally because indexing is a very complex process. Some of them implement simple tweaks and some are very complex. The more complex they enhance the system, the harder they are to configure. These same extensions can be installed on Enterprise Edition – of course care must be taken to choose an extension which provides better performance, not worse!

Graphic Designer