Improved: clearing local database improved for large stores