The situation is as follows...
We have 3 methods to save data:
1 - We save player data every time it changes.
2 - We save player data at a time interval.
3 - We save player data when disconnecting from the server.
Now the question is, which method is more optimized and which of them have a low risk of data loss in case of an error.
In my opinion method 1 is good for data security but we lose on the optimization side (so I think) even if we use async
PS. I forgot to specify that we use mysql