Answer the question
In order to leave comments, you need to log in
What table structure can be improved to store the client's balance?
At some particular moment, the customer table grew. This table is used in a large number of different processes, for building reports and there are constant changes in it. One of the important elements is the data on the current balance of the client's funds, which is stored in the balance field in the clients table. This field is constantly loaded by parallel requests to get and change its current value. In such situations, there is a risk of simultaneous write-offs from the same balance without taking into account its parallel changes from other processes.
How can the structure of the clients table be improved?
Answer the question
In order to leave comments, you need to log in
customer table has grown
In such situations, there is a risk of simultaneous write-offs from the same balance without taking into account its parallel changes from other processes.
One of the important elements is the data on the current balance of the client's funds, which is stored in the balance field in the clients table. This field is constantly loaded by parallel requests to get and change its current value.The balance field can be moved to a separate table, then the clients table will not be blocked. Right now there are many reads and writes on the same table. With a separate clients table, it will be almost read-only, and a write-frequent balance table will not block clients requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question