Hey! I have a script, but it is very long (1 hour), how to make the script faster, help me please!
for new in Bet.objects.filter(score='-').values():
model_new = Bet.objects.get(id=new['id'])
title_new = model_new.title
name_command = model_new.name_command
p1= int(float(model_new.p1) * 10) / 10
X = int(float(model_new.X) * 10) / 10
p2 = int(float(model_new.p2) * 10) / 10
for old in Bet.objects.exclude(score='-').values():
model = Bet.objects.get(id=old['id'])
title_old = model.title
p1_old = int(float(model.p1) * 10) / 10
X_old = int(float(model.X) * 10) / 10
p2_old = int(float(model.p2) * 10) / 10
if title_new == title_old and p1 == p1_old and X == X_old and p2 == p2_old:
print(name_command)