How to reindex Magento data via SSH?
Magento indexing is a mechanism that affects the store performance in various ways. It uses a special database structure namely Entity-Attribute-Value (EAV) to retrieve simple results from complicate database queries.
Through Magento index management, you can improve the performance of your storefront such as products and categories. Whenever data changes, store data automatically updated or reindexed with the help of Magento indexing. When it comes to Magento architecture, it is very sophisticated which has tons of merchant data like catalog data, prices, stores, and users in the form of different database tables. Magento accumulates these data into special tables which will help in storefront optimization.
To understand in detail, have a look at below example.
When you change the price of an item from 5$ to 3$, Magento automatically reindex the changed price and allow it to display on your storefront.
If your storefront does not have indexing, Magento would simply calculate the price of every products by its own without following price rules, discounts, bundle pricing, etc. This will result into a slow loading site may resulting in cart abandonment.
To input indexing in Magento 2, you can use the list of below commands.
- Shows allowed Indexers: php bin/magento indexer:info
- Reindexes Data: php bin/magento indexer:reindex
- Resets indexer status to invalid: php bin/magento indexer:reset
- Set Indexer Dimensions Mode: php bin/magento indexer:set-dimensions-mode
- Sets index mode type: php bin/magento indexer:set-mode
- Shows Indexer Dimension Mode: php bin/magento indexer:show-dimensions-mode
- Shows Index Mode: php bin/magento indexer:show-mode
- Shows status of Indexer: php bin/magento indexer:status