Improving full rescan and local cache db