Magento 2 Price Index: How Prices Are Stored, Cached & Why Reindexing Is Slow
Next time a client asks "why is my reindex slow?", the answer is almost always the price index . It's the indexer that scales worst with catalog size, the one that chokes on webshops, B2B stores, configurable-heavy catalogs and (counter-intuitively) gets more painful the more you try to "fix" it with raw SQL. Yet most developers treat it like a black box. In this guide I'll pull back the curtain on how Magento actually stores and computes prices, why the price index behaves the way it does, and — crucially — the strategies that actually move the needle. How Magento stores prices (the part nobody reads) Prices do not live on the product table. When you save a product, Magento stores the raw price on catalog_product_entity_decimal — one row per product, attribute, store and scope. But the moment you add any of the following, the "true" price stops being a simple column lookup: Tier prices ( catalog_product_entity_tier_price ) Special price scheduling ( special_from_date / special_to_date ) Catalog price rules ( catalogrule , applied via rules engine) Group prices (customer groups) Bundle/grouped product composite pricing Configurable products with per-option price adjustments Staging updates (Content Staging, Magento Commerce) Because the effective price depends on time, customer group and rules, Magento has to precompute it. That precomputation is the price index. When it works, page requests just read a flat, pre-joined set of rows instead of re-evaluating every rule on every request. When it's stale or under-built, you either serve wrong prices or you trigger expensive on-the-fly calculation. What the price index actually is The price indexer writes to the catalog_product_index_price table (plus _idx / _tmp variants and the catalog_product_index_price_final_tmp intermediate tables). A reindex runs in phases: Reindex all products into the _tmp table with their base price. Apply tax , tier , special , group and rule adjustments. Handle composite products (bundle's mi