If you have to import large number of items in your shop, it might be useful to change the index mode before the import to MANUAL UPDATE,  and switch it back to UPDATE ON SAVE after the import is finished. This way you can speed up the time of the import.

To accomplish this you can add the foloowing snippet before the import to change the index mode to MANUAL UPDATE:

  for ($i = 1; $i <= 9; $i++) {
      $process = Mage::getModel('index/process')->load($i);
      $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save();
      $process->save();
  }

 

And after the import is finished with the following snippet you change it back to UPDATE ON SAVE:

  for ($i = 1; $i <= 9; $i++) {
      $process = Mage::getModel('index/process')->load($i);
      $process->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)->save();
      $process->save();
  }

 

Have fun coding ;)