Performance improvement for finding if a slug is already used or not