Optimisation des index Magento 2 : astuces + module Index Manager en un clic
Magento 2 Indexing: Modes, Performance, and Batch Size Optimization
Magento is a flexible and powerful e-commerce platform. But to ensure smooth performance, especially as your catalog glignes, it’s essential to understand how Magento’s indexation system works. Indexes help Magento retrieve data faster, reduce the load on the database, and improve both frontend speed and back-office operations.
Dans cet article, nous’ll explain:
-
What Magento indexes are and why they matter
-
The difference between On Save and On Schedule indexation modes
-
How batch size affects indexation time and server performance
-
How the AdvancedIndexManager module vous aide à manage indexes more efficiently
What Are Magento Indexes?
Magento uses several types of indexes to store pre-calculated data in dedicated tables. These indexes avoid heavy real-time database queries, which can slow down your site. Each index focuses on a specific area of your store.
Voici the main Magento indexes:
-
Product Price Index: Keeps product tarification up to date, especially when promotions or règle de prix du catalogues are applied.
-
Catalog URL Rewrites: Generates clean and SEO-friendly URLs for products and categories.
-
Category Products Index: Links products to categories to ensure fast loading of page de catégories.
-
Product Attribute (EAV) Index: Supports filtreing and layered navigation, especially useful in large catalogs.
-
Catalog Search Index: Speeds up recherche results and improves accuracy.
-
Customer Group Price Index: Displays the correct prixs for different client segments, tel que wholesale or VIP clients.
Indexing Modes: On Save vs. On Schedule
Magento vous permet de choose between two indexation modes: On Save and On Schedule. Each has its avantages depending on how your store operates.
On Save
With this mode, indexes are updated immediately when you make changes to products, categories, or related entities.
Advantages:
-
Changes appear instantly on the frontend
-
Useful during promotions or campaigns where timing is critical
Disavantages:
-
Can slow down the panneau d'administration, especially during large updates
-
May increase server load during peak activity
On Schedule
Here, indexation is handled by scheduled tasks (via tâches cron), usually every few minutes.
Advantages:
-
Reduces the load during product edits or imports
-
Maintains smoother performance for both back-office and frontend
Disavantages:
-
Changes are not reflected immediately
-
Requires a working cron setup
For most stores, On Schedule is the better long-term choice. It avoids unnecessary load during busy periods. On Save is better suited for short-term use when immediate updates are needed.
Why Batch Size Matters
Magento processes data in batches during indexation. The batch size determines how many items are processed in each cycle. This setting has a direct impact on how long indexation takes and how it affects your server.
-
A small batch size means longer indexation time, but with lower server impact.
-
A large batch size speeds up indexation but may consume more memory or cause timeouts on weaker servers.
Tuning the batch size for each index type can help you reach a better balance between speed and stability.
For exemple:
A store with 40,000 products reduced its indexation time by nearly 50% after increasing the batch size from 200 to 800, without affecting server performance.
Unfortunately, Magento doesn’t offer an easy way to adjust these valeurs natively — and that’s where AdvancedIndexManager becomes useful.
Managing Indexes with AdvancedIndexManager
AdvancedIndexManager is a Magento 2 module designed to give you more control over how indexation works.
It vous permet de:
-
Adjust batch size per index to match your store’s capacity
-
View indexation logs to understand how long each index takes
-
Get suggestions for better batch size valeurs basé sur your data
-
Control everything from the panneau d'administration without using ligne de commande tools
C'est especially helpful if your store has thousands of products or frequent catalog changes. Instead of dealing with delays or server strain, you can configure your indexation to match your needs.
Conclusion
Magento indexation is a clé part of your store’s performance and stability. Choosing the right indexation mode and setting an appropriate batch size can help you avoid unnecessary slowdowns and keep your store responsive.
With a tool like AdvancedIndexManager, you can take control of indexation without needing to dive into technical settings. Whether you're running a small shop or a large catalog, optimized indexation will make daily operations faster and more reliable.