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?
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,
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.
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.
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.
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.