Magento's index_process* tables (index_process_event and index_event) are getting quite big.
I was looking in Mage_Index (Magento 1.7.0.2) module if there is something in place for cleanup (deleted entries that are not required).
Am I missing something or the information in these tables never get cleaned?
UPDATE:
Looking at Mage_Index_Model_Resource_Event::_afterSave() there is a part that is used for deleting records with the status done:
protected function _afterSave(Mage_Core_Model_Abstract $object)
{
$processIds = $object->getProcessIds();
if (is_array($processIds)) {
$processTable = $this->getTable('index/process_event');
if (empty($processIds)) {
$this->_getWriteAdapter()->delete($processTable);
} else {
foreach ($processIds as $processId => $processStatus) {
if (is_null($processStatus) || $processStatus == Mage_Index_Model_Process::EVENT_STATUS_DONE) {
$this->_getWriteAdapter()->delete($processTable, array(
'process_id = ?' => $processId,
'event_id = ?' => $object->getId(),
));
continue;
}
$data = array(
'process_id' => $processId,
'event_id' => $object->getId(),
'status' => $processStatus
);
$this->_getWriteAdapter()->insertOnDuplicate($processTable, $data, array('status'));
}
}
}
$processIds is array('new') when a product is saved (and indexes set to manual update) and when the reindex runs this part doesn't seem to run.
But, I remember an async reindex module (I think it was "Fast Asynchronous Re-indexing") which did this just fine. If you have this, you maybe have not configured it correctly? Like adding the cronjob to execute their shell script?
You need to know, if its a lot of entries, it does not process all of them at once, it only processes a part of it on every call.
– Flyingmana Dec 24 '13 at 10:56