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
$mainTable = 'customer_grid_flat',
$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.