Enhance performance on update script