38
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 ...
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 ...
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 ...
20
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:...
18
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 ...
14
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 ...
10
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 {} \;
...
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(...
9
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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:
...
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 ...
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 :
...
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/&...
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....
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 ...
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 ...
5
votes
"indexer_update_all_views" cron job runs seemingly forever
I was able to - at least temporarily - fix the problem by doing a complete, manual reset of the indexing process.
First disable the cronjob. Make sure no job will be running anymore (ps aux | grep ...
4
votes
What EXACTLY happens to db tables when I Flush Categories, or Index Products?
Magento uses the EAV (Entity Attribute Value) method. This means that every attribute you add to a product or category, is saved in a separate table (eav_attribute and catalog_eav_attribute).
When ...
4
votes
Cannot initialize the indexer process?
To resolve the "Cannot initialize the indexer process" you need to run follow below step
Solution 1 :-
This is usually occurred when we Enable "Use Flat Catalog Category"
and &...
4
votes
identifying index tables in Magento (1.4) and can they be skipped on export and rebuilt
Magento uses these *_idx tables, but also catalog_product_flat_* and catalog_category_flat_* tables. There is a flat table for every store you have. In these cases, the "*" will be replaced by the ...
4
votes
Magento 2.1.3 : Indexer creates an extra index on production, not on local development
TL;DR.
I think there is a problem with your created_in column from the customer_entity table in one of the environments. For some reason the size of the column is not taken into consideration.
May be ...
4
votes
Reindexing : When do you use 'Update on schedule' or 'update on save'?
Update on save (realtime): Indexed data is updated as soon as a change is made in the Admin. (For example, the category products index is reindex after products are added to a category in the Admin.) ...
4
votes
Magento 2 - How to reindex one product
You can use something like
public function reindexByProductsIds($productIds, $indexLists)
{
foreach($indexLists as $indexList) {
$categoryIndexer = $this->...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
indexing × 382magento2 × 112
reindex × 74
magento-1.9 × 60
database × 45
product × 30
magento-enterprise × 22
indexer × 19
category × 18
magento-1 × 15
price × 14
catalog × 14
catalogsearch × 14
magento-1.8 × 13
cron × 13
performance × 13
elasticsearch × 13
index × 13
cache × 12
magento-2.1 × 11
magento-1.7 × 11
error × 11
flat-catalog × 11
admin × 10
search × 10