I'm using Django, using a Postgres DB, and I wonder:
say I have a function like this:
def yay_func(obj):
log('yay')
obj.is_yay = True
obj.save()
If I wrap this function in a transaction, will I cause any strain on my db?
I checked the Django connections object, so I know another db request is made for creating a "save point", but I wonder if it's something I should consider when I'm trying to optimize my performance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…