Add index on version to speed up the sorts