This is a good question. If you answer it carefully, you can write a lot. However, since the amount of information given in the question is too small, it will not be divergent.
First of all, each update is 100ms. Have you checked where the bottleneck of DB is? Is the disk slow? Or not enough memory? It is difficult to solve the problem by guessing without knowing the bottleneck.
Secondly, I think your ID must be indexed, otherwise it should be slower. Then a simple improvement is that instead of each update being a Transaction, try saving hundreds or thousands of updates and submitting them at once.
Then, I guess you have optimized the PG configuration. If not, look for information on this and give it a try.
This is a good question. If you answer it carefully, you can write a lot. However, since the amount of information given in the question is too small, it will not be divergent.
First of all, each update is 100ms. Have you checked where the bottleneck of DB is? Is the disk slow? Or not enough memory? It is difficult to solve the problem by guessing without knowing the bottleneck.
Secondly, I think your ID must be indexed, otherwise it should be slower. Then a simple improvement is that instead of each update being a Transaction, try saving hundreds or thousands of updates and submitting them at once.
Then, I guess you have optimized the PG configuration. If not, look for information on this and give it a try.