Current location - Loan Platform Complete Network - Big data management - java reading big data from database
java reading big data from database
This way to read millions of pieces of data each time, it is strange not to crash,

My idea is that you go to check in batches, and then export in batches,

similar to paging, every 1000 or more as a batch

By batch to perform, and then make a progress bar, according to how many batches as the number of progress for the export

This should be a lot better

It is also possible to make a caching mechanism to store the next time you get the data directly from the cache.

There could also be a caching mechanism to store batches, so that the next time you get data, you get it directly from the cache

.