In Magento 2.1.8, Customer Grid is populating from table customer_grid_flat
rather than customer_entity
. This is for fastest retrieval of data. But the problem is customer_grid_flat
never gets populate until I manually reindex the grid using SSH.
For a quick hack I have changed the code in blow file
Line 37: vendor/magento/module-customer/Model/ResourceModel/Grid
Old Code
$mainTable = 'customer_grid_flat',
New Code
$mainTable = 'customer_entity', //'customer_grid_flat',
Now some columns are not showing data like Name, Phone, Country etc. because of missing joins with relevant tables. Can anyone please suggest any better solution.
php bin/magento indexer:reindex customer_grid
after check it check your indexer settings and crontab setup!Update on Save
mode in admin for the cutomer grid?