3

I would like to know what is a difference between Magento 1 indexing and Magento 2 indexing. I heard that Magento 2 indexing is faster than Magento 1 indexing. Anyone explain that what indexing features or architecture make fast in Magento 2?

1

2 Answers 2

8
+50

Yes, it must be faster than Magento v1.x (by at least 20%). Improved scalability consists of improved indexers, new Magento performance toolkit, Varnish Cache, Full page caching,

  1. What is Magento 2 index

    Indexing is how Magento transforms data such as products, categories, and so on, to improve the performance of your storefront. As data changes, the transformed data must be updated—or reindexed. Magento has a very sophisticated architecture that stores lots of merchant data (including catalog data, prices, users, stores, and so on) in many database tables. To optimize storefront performance, Magento accumulates data into special tables using indexers.

    Improve indexers:

    Indexing is the way Magento system transforms merchant data, such as catalog data, prices, users, stores, etc. by creating index tables and keeping them updated to boost the query speed and improve the performance of your online store. The new default indexers in Magento 2 include all of the functionality as in the previous enterprise versions. The difference is that they come with more efficient updates and have been improved to speed up the query performance.

    Magento performance toolkit: To verify and optimize system performance, one can create test environments and test code changes by using Magento 2’s new set of performance test scripts.

    2. Varnish

    To help reducing server load and speed up the page load, Magento 2 is integrated with Varnish Cache the leading HTTP accelerator technology responsible for caching common requests.

    3. Full page caching

    This means all content from a static page is cached, therefore, increasing performance and significantly reducing the server load.

    4. Multiple admin users

    With Magento 2, multiple admin users can create and edit products without the fear of data conflicts.

Magento DevDocs Indexing overview

7
  • Thanks for reply but what Magento 2 indexing features make faster than Magento 1 ? I want this differences. I already read on Magento official website same thing 4 days ago...this is not mentioned difference between Magento 1 and Magento 2 indexing features.You know differences ? Commented Feb 9, 2018 at 4:57
  • check updated answer. Commented Feb 9, 2018 at 5:16
  • @RavindrasinhZala How to reindex localhost magento 1.9.x using CMD in windows.
    – zus
    Commented Feb 9, 2018 at 5:35
  • magento.stackexchange.com/questions/162166/… check it @zus Commented Feb 9, 2018 at 5:37
  • @RavindrasinhZala I am asking, localhost reindex in windows os.
    – zus
    Commented Feb 9, 2018 at 6:12
6

Later in Magento 1, they have introduced incremental indexing, which index only changed entities. But this is only available for Enterprise edition for Magento 1. With Magento 2, this feature is available for both EE and CE versions.

What is incremental indexing: It keeps track of changed entities using MySQL triggers and does index updated entities using cron job. Indexer behavior can be changed in the admin, if you set it to update by schedule it will create triggers and update only required entities using cron job. It is important to have magento cron setup correctly to make this work. Updated entity ids will be stored in respective *_cl table and progress will be recorded in mview_state table. Check etc/mview.xml files and indexer_update_all_views cron task.

Magento 2.2 onward They have introduced replica tables to temporary store indexed data and then switch to the original table once indexing is completed to avoid errors due to table locking.

5
  • Any link for magento2 indexing info in details ? Magento 2 community provides any link for about magento 2 indexing details ? Commented Feb 15, 2018 at 7:42
  • @NirajPatel I couldn't find any references on the internet. I had to dig through the code to find out these details. Commented Feb 15, 2018 at 9:14
  • Just want to point out, that the statement that M1 CE does not have incremental indexing is incorrect. There are fundamental differences between Enterprise and CE's indexing process, but incremental reindexing is not one of them.
    – evensis
    Commented Feb 15, 2018 at 9:27
  • @evensis The module related to incremental indexing functionality is under Enterprise namespace in M1. (module Mview) You can not change the indexer mode to update on schedule in M1 CE. Commented Feb 15, 2018 at 10:05
  • Update on save is a 'partial' or 'incremental' reindex in every sense of the term, in that it only updates the saved entity_id at run-time. mode_schedule (you can find in CE 1.8+ codebase) was added in order to improve save performance and avoid impacting the frontend. So they needed a way to track and log changes transparently and materialised views were the ideal solution (or the psuedoy kind Enterprise has) so it could run on cron. So essentially almost eliminates the need for full reindex runs. Anyway, point is, ones a hell of a lot more efficient than the other at doing the same thing.
    – evensis
    Commented Mar 1, 2018 at 15:28

Your Answer

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

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