Skip to main content
87 votes
Accepted

What is mview in Magento 2?

In official documentation: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/indexing.html there is the stement: `Allows tracking database changes for a certain entity (product, category ...
Daniel Ifrim's user avatar
  • 3,404
37 votes
Accepted

Magento 2 Tables Being Created Ending in "_cl"

Those tables are related to MView from Magento 2. It's the indexer that runs in cron every minute by default. MView is used if you set the indexer mode to 'Index by Schedule'. Magento checks if the ...
Daniel Ifrim's user avatar
  • 3,404
36 votes

Re-index magento via ssh / putty

You are running this command from ROOT and indexer.php is located under shell directory. So try this commands instead: php shell/indexer.php --reindex catalog_product_attribute For re-indexing all ...
Anil Suthar's user avatar
  • 4,731
30 votes
Accepted

Reindexing : When do you use 'Update on schedule' or 'update on save'?

Update on Save :The index is set to update whenever a change is saved. Update on Schedule :The index is set to update on schedule according to a cron job. On a small store,Update on Save is fine ...
Mohammad Hammadi's user avatar
27 votes
Accepted

Magento 2: Are Flat Tables Still a Thing?

Yes, flat tables are still a thing. You can enable flat tables for products and categories from stores->configuration->catalog->storefront. Why do we need flat tables? They do offer significant ...
Abhishek Jakhotiya's user avatar
18 votes

How to solve indexer status "suspended" (n in backlog)

I found out, that the status is set in \Magento\Framework\Mview\View::suspend() and removed in \Magento\Framework\Mview\View::resume(). These methods are only called in \Magento\Indexer\Model\Indexer:...
Fabian Schmengler's user avatar
17 votes

Indexer stuck in processing

You can fix this from the command line by reseting the index which will invalidate the state of the index and remove the processing flag from the index. php bin/magento indexer:reset Optionally you ...
Christopher Hackett's user avatar
13 votes
Accepted

Magento 2 error when trying to reindex

OK I think I have the answer here. The issue is that Magento checks table status and doesn't find the key as an auto_increment value (even though it is.) If you run this: show table status; And ...
S Adamson's user avatar
  • 719
9 votes

What is mview in Magento 2?

Reference from Magento document is already here so I'm skipping that part. Magento implemented materialized view in 2.0 which tracks changes for all indexers. Each indexer has a _cl table which gets ...
Aman Srivastava's user avatar
9 votes
Accepted

Programmatically run single product indexing in magento EE 1.14

After lot of debugging, i found the sound code which does reindex product by product id. Here is the way - require_once('app/Mage.php'); umask(0); Mage::app(); // Get products $productsIds = array(...
Amit Maurya's user avatar
  • 2,871
9 votes

cache_dir "/var/www/html/Magento2/var/cache/" is not writable

Need to set permission to var/cache folder find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find var pub/static pub/media app/etc generated/ -type f -exec chmod g+w {} \; ...
Arunprabakaran M's user avatar
8 votes

Magento 2: Are Flat Tables Still a Thing?

Based on magento documentation for flat table mentioned in https://docs.magento.com/m2/ce/user_guide/catalog/catalog-flat.html Starting with Magento 2.3.0+, the use of a flat catalog is no longer a ...
Sarjan Gautam's user avatar
8 votes
Accepted

Difference between magento 1 indexing and magento 2 indexing

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 ...
Ravindrasinh Zala's user avatar
7 votes

What is mview in Magento 2?

The mview.xml is used along with indexer.xml to setup indexers. The mview.xml file declares: indexer view ID indexer class the database tables the indexer tracks what column data is sent to the ...
Raphael at Digital Pianism's user avatar
7 votes
Accepted

Update on Save vs Manual Update Which Is Most Reliable In Magento Indexing

Update on save will fire some (indexing related) events after a product is saved, so a full reindex won't be necessary after product updates. Manual mode won't fire anything, so product updates will ...
Raul Sanchez's user avatar
  • 3,125
7 votes

MAGE_DIRS bootstrap parameters in CLI

After much travail, I found a solution using environment variables, which I know isn't what you wanted. You can set the parameters using environment variables like this (replacing $APP_ROOT with your ...
Scott Buchanan's user avatar
7 votes
Accepted

M2.2.5 : Can someone explain the role / functionality of the various tables used by the indexing process?

catalog_category_product_index_tmp is used to store intermediate data for a batch product in the process of indexation *_replica tables are used for full indexation process to not affect the Store ...
KAndy's user avatar
  • 20.9k
7 votes
Accepted

Magento 2 Is it possible to run reindexing per storeview?

There is no direct way to do this. But you may be approaching it from the wrong angle anyway. In normal operation you shouldn't have to do a full reindex at any time. If you have the indexing mode ...
Rick Schippers's user avatar
7 votes
Accepted

Indexing product prices fails

First You need to export inventory_stock_1 view from your database then inventory_stock_1.sql file open in any text editor then 'DEFINER='ku0h8_mag_stagin'@'localhost' and remove from your SQL file ...
Chirag Gondaliya's user avatar
7 votes
Accepted

Magento 2.3 inventory index gives The product that was requested doesn't exist. Verify the product and try again

Recently we experienced this very issue too. Solution in our case was making sure the inventory_source_item MySQL table does not contain any defunct SKU's. To lookup corrupted records in said table, ...
Ward's user avatar
  • 96
6 votes

Magento2 prevent reindex after adding product programmatically

inject \Magento\Indexer\Model\IndexerFactory to the __construct method instantiate it as class variable ($this->_indexerFactory right now) run the following code after saving product: ...
Mammouth's user avatar
  • 731
6 votes

MAGE_DIRS bootstrap parameters in CLI

Another, simpler option is to simply hard-code the media path in the store config under Stores > Configuration > Web to: {{unsecure_base_url}}media/ and {{secure_base_url}}media/ Due credit to ...
Scott Buchanan's user avatar
6 votes

Difference between magento 1 indexing and magento 2 indexing

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 ...
B G Kavinga's user avatar
  • 1,266
5 votes

Magento Indexer Not Adding Attribute to flat table in custom attribute

As already told in other answers, you need used_in_product_listing to be set to 1. But as you defined a source model ('source' => 'vendorsproduct/source_approval',), you may need an extra step : ...
Cladiuss's user avatar
  • 1,283
5 votes

Magento Indexer Not Adding Attribute to flat table in custom attribute

Another way to add attributes to flat tables is to set them in your config.xml frontend section ... <product> <collection> <attributes> <attribute_code/&...
sv3n's user avatar
  • 11.7k
5 votes
Accepted

Implementing a custom Magento indexer in an extension

In order to declare an index you need to add this to config.xml inside the global tag: <index> <indexer> <some_unique_index_name_here> <...
Marius's user avatar
  • 198k
5 votes
Accepted

Redis timeout after a reindex

CAUSE: The line in question returning the exception in CRedis: https://github.com/tburry/credis/blob/master/Client.php#L991-L1002 NOTE the timeout causing because of the read meta data of the ...
B00MER's user avatar
  • 8,307
5 votes

Indexer stuck in processing

unfortunately your only option is to change in the database the state of the processing indexes because till there are processing indexes no other index gets updated and neither the command line works....
springerin's user avatar
5 votes

Magento indexing causing website downtime

First of all if you have Flat Category enabled, indexation is going to put your website down. You must create a custom solution for aliasing the tables like described in my Indexation talk at Magento ...
Ivan Chepurnyi's user avatar
5 votes

How to solve indexer status "suspended" (n in backlog)

You don't need to edit database to do so, you can do the same by resetting and indexers and then reindexing them again by using following commands; php bin/magento indexer:reset php bin/magento ...
Vivek Kumar's user avatar
  • 5,665

Only top scored, non community-wiki answers of a minimum length are eligible