Speed up native versioning using temp tables