Magento full reindex card listing six indexers with bar lengths for their run times and a total of over seven hours

How to Speed Up Magento Reindexing: 10 Fixes, From Indexer Mode to the Indexer Itself

Adobe documents the settings that speed up Magento reindex jobs, and on plenty of Magento (Adobe Commerce) stores they are all a developer needs.

A reindex is Magento rebuilding the ready-made tables it reads prices, category listings, stock, and search results from, so a change saved in the admin shows up in the store. Each indexer is the job that rebuilds one of those tables.

Those settings are spread across several pages, and each one speeds up some indexers while the rest stay as slow as before. No page says which indexer your store is waiting on, so a team can apply them all and still see the nightly reindex run into the working day, with no idea what is left once the settings run out.

How to speed up Magento reindex jobs: the 10 fixes in order

To speed up Magento reindex jobs, measure first, then work through the settings Magento already has, the fixes for specific indexers, the server and the schedule, and last the indexer itself. When a Magento 2 reindex is slow, go down the list in order and stop once the indexer your store waits on is fast enough.

  1. Find the slow indexer before you change anything
  2. Run every indexer on Update by Schedule
  3. Split full reindexes across processes with MAGE_INDEXER_THREADS_COUNT
  4. Split the price index by website and customer group
  5. Raise the changelog batch size for slow extension indexers
  6. Merge catalog price rule conditions
  7. Keep full reindexes from blocking scheduled updates
  8. Give MySQL the memory the indexer batches ask for
  9. Stop indexing what nothing reads
  10. When tuning runs out, change the indexer itself

1. Find the slow indexer before you change anything

Most fixes below help some indexers and do nothing for others, so time each indexer before you change a setting. When a Magento reindex is taking too long, the total run time doesn’t show which job the hours go to. Write down two numbers per indexer: its full reindex time and its backlog, meaning changes recorded but not yet applied.

bin/magento indexer:status

In the output, the Update On column shows each indexer’s mode, and for scheduled indexers the Schedule Status column shows the backlog, for example idle (0 in backlog).

Then, on a staging copy with production-size data, rebuild one indexer at a time. Each run ends with “has been rebuilt successfully in” and the time it took.

bin/magento indexer:reindex <indexer_id>

Cron history shows how long indexing takes in production:

SELECT job_code, status, executed_at, finished_at,
       TIMEDIFF(finished_at, executed_at) AS took
FROM cron_schedule
WHERE job_code IN ('indexer_reindex_all_invalid', 'indexer_update_all_views')
ORDER BY executed_at DESC
LIMIT 50;

To spot full reindexes that run too often, Adobe’s article on full reindexing checks which indexers were updated in the last 15 minutes:

SELECT indexer_id, status, updated FROM indexer_state ORDER BY updated DESC;

A profiler such as New Relic or Blackfire shows which query inside one indexer is slow.

2. Run every indexer on Update by Schedule

With Update on Save, Magento updates the index as part of each admin save. With Update by Schedule, MySQL triggers record what changed in a changelog table, and cron applies only those rows every minute. Check the mode of every indexer, because an indexer left on save still does its work inside each save.

bin/magento indexer:show-mode
bin/magento indexer:set-mode schedule

Adobe’s indexer documentation says to enable maintenance mode and disable cron jobs before you switch, to avoid database locks.

The 2.4.8 release notes say new indexers default to Update by Schedule and existing indexers are not affected, so a store upgraded to 2.4.8 can still have indexers on Update on Save. Customer Grid supports schedule mode only from 2.4.8. Adobe also warns that with Update on Save, some data can be lost if you make changes during a full reindex.

Our Magento reindex guide explains the modes themselves.

3. Split full reindexes across processes with MAGE_INDEXER_THREADS_COUNT

MAGE_INDEXER_THREADS_COUNT lets a full reindex fork child processes and run several units of work at once, but only three core indexers use it. In Magento 2.4.8, forking needs a value above 1, the PHP pcntl extension, and a run from the CLI outside setup mode. With the variable unset, every unit of work runs one after another.

Category Products (catalog_category_product) and Catalog Search (catalogsearch_fulltext) split their work by store view, and Product Price (catalog_product_price) splits it by price dimension (fix 4). Adobe Commerce adds Catalog Permissions, split by customer group. Product EAV (catalog_product_attribute), the catalog rule indexers (catalogrule_rule and catalogrule_product), and Stock (cataloginventory_stock) never fork, and neither do the scheduled, partial updates of these indexers.

Adobe’s documentation calls parallel mode “enabled by default” for the two store-view indexers, yet in the source both run one store at a time until the variable is set above 1.

Adobe’s example sets it for one run:

MAGE_INDEXER_THREADS_COUNT=3 php -f bin/magento indexer:reindex catalogsearch_fulltext

For reindexes that cron starts, add it as a top-level key in app/etc/env.php:

'MAGE_INDEXER_THREADS_COUNT' => 3,

Start low and watch the database load. If one child process fails, the run ends with a “Fail in child process” error.

๐Ÿš€ Quick takeaway

On Magento Open Source with one store view and the price index in its default none mode, MAGE_INDEXER_THREADS_COUNT has nothing to split.

4. Split the price index by website and customer group

In the default dimensions mode, none, the price index is one table and one job, so threads have nothing to run in parallel. A dimension is a property the index is divided by, here website and customer group. Switching Product Price to website_and_customer_group gives it one table per website and group, and a full price reindex then runs one job per table.

bin/magento indexer:show-dimensions-mode
bin/magento indexer:set-dimensions-mode catalog_product_price website_and_customer_group

The other modes are website and customer_group. The switch creates the new tables, copies the current index rows into them, and drops the old ones, without a full reindex. Only Product Price has dimension modes in Magento Open Source, and with the threads from fix 3 in place, its per-table jobs run in parallel.

Exclude websites a customer group never uses

Many websites, customer groups, and B2B shared catalogs make the Product Price and Catalog Rule indexers run long. Adobe’s indexing optimization guide notes that websites excluded from a customer group are not indexed, which cuts indexing time for both.

Saving a customer group with a newly excluded website invalidates the Product Price, Catalog Rule, and Catalog Search indexes, so plan a window. The NOT LOGGED IN group can’t exclude websites, and customers can’t log in on a website excluded for their group.

Table of Magento indexers showing which ones run in parallel with MAGE_INDEXER_THREADS_COUNT and which never do
Only three core indexers split a full reindex across processes in Magento 2.4.8

5. Raise the changelog batch size for slow extension indexers

Scheduled updates are applied 1,000 changed IDs at a time, Magento’s default batch size for every core indexer, and each batch is a separate partial reindex. In our experience, when the backlog is close to the size of the catalog, that path can be much slower than a full rebuild. For a slow extension indexer, a larger changelog batch size means fewer of those cycles.

A full reindex fills a replica table in batches and swaps it with the live table once. A partial reindex of prices fills a temporary table, copies it into the live table, and deletes outdated rows, once for every batch.

First, find out why the backlog is that big. It usually means updates are written without a real change, for example by an import or sync. Then, for a poorly built extension indexer, raise its batch size in a module’s di.xml, using the view ID from that extension’s etc/mview.xml as the item name:

<type name="Magento\Framework\Mview\View">
    <arguments>
        <argument name="changelogBatchSize" xsi:type="array">
            <item name="vendor_view_id" xsi:type="number">5000</item>
        </argument>
    </arguments>
</type>

Raise the value in steps and watch memory, because a bigger batch can run slower or run out of memory. On core indexers it rarely helps.

Magento full reindex swapping in a replica table once versus a scheduled reindex copying each batch into the live table
Full vs scheduled Magento reindex: one table swap, or one copy per batch

6. Merge catalog price rule conditions

A catalog price rule built from many single conditions, such as “SKU is X” and “SKU is Y,” reindexes slower than the same rule written as one “SKU is one of X, Y, Z” condition. Each condition adds its own sub-query to the product search and its own check per product, so indexing time grows with the number of conditions.

In Magento 2.4.8, that check runs in PHP for every product the query returns, once per website the rule is assigned to, so assign each rule only to the websites and customer groups that need it.

Adobe’s advanced setup guidance notes that batching is not enabled for the catalog rule indexer and tells stores with many rules to raise MySQL’s tmp_table_size and max_heap_table_size (16M each by default), at the cost of more RAM.

Since 2.4.8, saving a rule reindexes only the affected products instead of invalidating the index. A separate guide covers catalog price rules that don’t apply at all.

๐Ÿš€ Quick takeaway

A catalog price rule writes one index row per matching product, per website, and per customer group it covers. Fewer conditions, websites, and groups on a rule means less to rebuild.

7. Keep full reindexes from blocking scheduled updates

While Magento rebuilds an indexer from scratch, it pauses that indexer’s scheduled updates until the rebuild ends, along with those of any indexer that shares its index. Category Products and Product Categories (catalog_product_category) share one index, and so do the two catalog rule indexers. Changes saved in the meantime wait in the changelog, so a long full reindex delays them all.

Cron runs the index group as a separate process. Every minute, indexer_reindex_all_invalid fully rebuilds any indexer marked invalid and indexer_update_all_views applies scheduled updates. An hourly job cleans the changelogs. A manual indexer:reindex skips an indexer that another process is already rebuilding.

On stores we support, we have seen full reindexes run for hours more than once. To keep them short and rare:

  • On a store already on Update by Schedule, remove “reindex everything” lines from the server crontab.
  • Reindex an invalid indexer by name.
  • As Adobe advises, make attribute, store, website, and configuration saves, which trigger full reindexes, outside business hours.
  • After each deploy, check which indexers went invalid.

If the symptom is products missing from category pages, a separate guide covers it.

Timeline of a full Magento price reindex with price changes waiting in the changelog while other indexers keep updating
A full Magento reindex pauses that indexer's scheduled updates until the rebuild ends

8. Give MySQL the memory the indexer batches ask for

Several indexers work through the catalog in batches held in MySQL temporary tables. Before the batches run, Magento raises the session tmp_table_size and max_heap_table_size if a batch needs more, and logs a warning when a batch would take more than 20% of innodb_buffer_pool_size.

Search var/log for this message:

Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size

Since Magento 2.4.3, you can set batch sizes in app/etc/env.php under indexer, then batch_size: per product type with a default fallback for price and stock, and one number for category products. The defaults are 5,000 for price, 200 for stock, and 100,000 for category products. These values are examples to test:

'indexer' => [
    'batch_size' => [
        'catalog_product_price' => [
            'default' => 1000,
        ],
        'cataloginventory_stock' => [
            'default' => 200,
        ],
        'catalog_category_product' => 100000,
    ],
],

Adobe says halving the batch size generally shortens the run. In its example, lowering the price batch from 5,000 to 1,000 took one store’s full indexing from about 4 hours to under 2 on a default MySQL configuration. Our Magento MySQL optimization guide covers the server settings.

๐Ÿš€ Quick takeaway

If var/log warns that the temporary table needs more than 20% of innodb_buffer_pool_size, batch size and MySQL memory are out of step: raise the buffer pool or lower the batch.

9. Stop indexing what nothing reads

Some reindex time goes to indexing that nothing on the store uses. Three checks find it: extension indexers that run or trigger extra full reindexes, flat catalog tables that are still switched on, and the Product EAV index on stores where no code reads it.

Extension indexers

bin/magento indexer:info lists every indexer on the store, and any ID outside Magento’s core list comes from an extension. Time it as in fix 1, check its mode, and check whether the extension marks core indexers invalid or runs its own full reindexes, a cause of frequent full reindexing that Adobe names. A code audit shows what each extension does to the indexers.

Flat catalog

Adobe’s knowledge base ties enabled flat catalog tables to heavy SQL load and long-running cron jobs. Check that no extension needs the flat tables, then set Use Flat Catalog Category and Use Flat Catalog Product to No under Stores > Settings > Configuration > Catalog > Catalog > Storefront. If the fields are grayed out, set flat_catalog_product and flat_catalog_category to 0 in app/etc/config.php and run bin/magento app:config:import.

The Product EAV indexer

This indexer builds the attribute index from values such as color or size, which Magento stores in the EAV model. Adobe documents a switch that turns it off when nothing reads the catalog_product_index_eav table: Enable EAV Indexer, under Stores > Settings > Configuration > Catalog > Catalog > Catalog Search. Check for reads on that table first, including from extensions, as the admin field itself warns.

10. When tuning runs out, change the indexer itself

After the first nine fixes, what is left is the work the indexers themselves do. Tuning Magento is a fair first step, and for many stores the last one. When one indexer still takes hours with every setting in place, a bigger server still runs the same slow work.

Expedio Indexers, a scandiweb product, changes the work itself. It replaces Magento’s own indexers with ones written in Go that write the same index data, so the theme, extensions, and admin stay as they are, and it runs beside Magento with a few environment settings and a port the store can reach. On a copy of a multi-store retailer’s catalog (421,000 products, Adobe Commerce 2.4.5, measured Nov 5, 2026), the indexers in the test took 9 h 37 min with Magento’s own indexers and 1 h 1 min with Expedio Indexers, 9.4 times faster. Product attributes, the indexer that threads can’t split, dropped from 5 h 48 min to 25 min 33 s, 13.6 times faster, and the benchmark lists the result for each indexer. It doesn’t fix an indexer stuck on bad data, a cron that doesn’t run, or a broken extension. Extension indexers are added per project, and a store with one store view, a small catalog, and a five-minute reindex doesn’t need it.

FAQ about slow Magento reindexing

What is mview in Magento 2?

Mview is the framework behind Update by Schedule. MySQL triggers write the IDs of changed entities into changelog tables whose names end in _cl, and the cron job indexer_update_all_views applies them every minute, in batches of 1,000 by default. Fix 5 explains when that batch size is worth changing.

Which Magento indexers can run in parallel?

Category Products and Catalog Search run in parallel per store view, and Product Price per dimension once indexer:set-dimensions-mode has split its index. Adobe Commerce adds Catalog Permissions. They fork only in a full reindex run from the CLI, with PHP pcntl installed and MAGE_INDEXER_THREADS_COUNT above 1. Product EAV, catalog rules, and stock always run in one process.

Does MAGE_INDEXER_THREADS_COUNT work when cron runs the reindex?

Yes, if Magento can read the variable when cron starts the run. Set it in the cron user’s environment or as a top-level key in app/etc/env.php, which Magento reads on every CLI run, including cron:run. Cron runs Magento from the CLI, so only the other two conditions remain: a value above 1 and the PHP pcntl extension.

Should a Magento store run a full reindex every night?

No, if the store is on Update by Schedule. Scheduled updates already keep each index current, and a full rebuild pauses that indexer’s scheduled updates until it ends, so changes saved during the rebuild wait. Rebuild only the indexers marked invalid, and do it outside business hours.

Will a bigger server make Magento reindexing faster?

Partly. More CPU cores let the three forking indexers use more threads, and more memory lets MySQL hold bigger batches. Product EAV, catalog rules, and stock still run in one process, so extra cores don’t split their work. Our Magento server sizing guide covers the requirements.

Start with the indexer your store waits on

To speed up Magento reindex jobs, start by timing each indexer, because most fixes in this list change some indexers and leave the rest alone. The full reindex time and backlog size from fix 1 show which of the later fixes can help your store.

Then apply the settings in order and measure again on staging after each change. If the indexer your store waits on is still slow after the first nine fixes, fix 10 covers what remains.

Send us your indexer status and reindex times, and we'll tell you which fix to try first.

Share on:

Share on X Share on LinkedIn Share on Facebook

You may also like