Indexer: catalog_category_product is taking huge amount of time
Category Products index has been rebuilt successfully in 03:25:32
Sometimes it fails with errors:
Base table or view not found: 1146 Table 'catalog_category_product_index_store{storeId}_tmp' doesn't exist
or
Could not acquire lock for index: catalog_category_product
Note that the current batch size for indexer is 100K
<type name="MagentoCatalogModelIndexerCategoryProductActionFull">
<arguments>
<argument name="batchRowsCount" xsi:type="number">100000</argument>
<argument name="batchSizeManagement" xsi:type="object">MagentoCatalogModelIndexerCategoryProductBatchSize</argument>
</arguments>
</type>
What are the ways to optimize the indexer esp. catalog_category_product?