Each run scanned the whole hashtags table. Collect the hashtag ids of the objects about to be deleted and check just those.