In magento2 - setup:upgrade command which is generally very fast, is taking a lot of time which has made me to see it suspiciously.

Indexers are all set on update On Schedule and when setup:upgrade command reaches at Magento_Indexer module it takes a lot of time to get over it probably equals to the time when indexers are run from command line.

I know upgrade commands clears a lot of code generated folders of magneto but seems like indexers are also included in version 2.3.2

Any response is very helpful?

1 Answer 1


There are 2 Recurring events for the indexer module:

  1. Recurring schema event - which checks for new indexers to add them to the indexer grid
  2. Recurring data event - event that calls the unsubscribe & subscribe method of the mview.

    From what is can see in the code, the unsubscribe method removes the triggers added to the db the the indexer is changed to Update on schedule and the subscribe adds the triggers back.

The subscribe/unsubscribe methods are defined in the Magento/Framework/Mview/View.php file, which will call the crate/remove methods from the Magento/Framework/Mview/View/Subscription.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.