B
B
BitNeBolt2020-03-17 11:44:49
Android
BitNeBolt, 2020-03-17 11:44:49

Saving several dozen values ​​in the database in short periods of time. Is it worth it?

The essence of the program is as follows:
Getting geolocation data in the onLocationChanged() method every few seconds (maximum 5). Each run needs to store data for 10 to 30 fields in the database. Will it be a normal solution in terms of performance and autonomy to update the values ​​​​in the database?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-03-17
@BitNeBolt

First, it's worth worrying about thousands of records per second. Secondly, it is better not to update, but to add data. This reduces the chance of blocking, and the amount of garbage in MVCC databases, and allows you to have a history of movements.

V
Vladimir Korotenko, 2020-03-17
@firedragon

Solve a business problem, if after the profile it says that it’s narrow here, optimize.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question