There are many articles that explain the difference between Magento’s two indexing modes: “on Save” and “by Schedule.” I won’t muddy the water by providing another technical explanation of the difference between the two. Instead, this article will focus on how to decide which mode is correct for a given environment.
Go “by Schedule”
In the majority of circumstances “by Schedule” is the better and safer mode for indexes. It’s worth highlighting this because “by Schedule” is not the default mode. A newly installed Magento instance will begin its life in “on Save” mode, hoping for the day that it graduates “by Schedule” and is put into production. (Similarly, Magento’s default deployment mode of “default” is not intended for production environments. Ultimately, it needs to be changed from “default” to “production.”)
Briefly, the reason to prefer “by Schedule” is because the indexes operate much more efficiently and reliably in this mode. Especially in a production environment under a load of traffic, expect both a more efficient utilization of server resources (CPU and memory) and a quicker reaction to entity updates made in the admin. Like product updates!
The Exception
There is always one exception. “On Save” mode is appropriate for some circumstances. An environment that does not run Magento’s “heartbeat” cron system should leave indexes in “on Save” mode. Generally, it is ideal to run Magento’s cron system in all environments, but it is common to encounter environments where the Magento cron is not running. This might be because the cron causes undesirable behavior in a non-production environment or simply because the resource utilization of the cron system is not desired (because server resources cost money).
These exceptions are occasionally encountered. But for the record, the ideal for all environments, including local development environments, is to have the most similarity to the production environment, i.e., run the cron, set the indexing mode to “by Schedule.”