Fix bug: Handle the case when there is a huge number of items to remove (sqlite limitation)