Java – what’s faster – storing data in lists or databases? (robot)

I am currently working on a school project (Android application). We should store user fee and income information in the local SQLite database, and then display it as various charts, etc

My question is; What will be faster? Constantly query the database to get information about some expenses, or just query at startup and store the returned value in the list as an object?

thank you!

resolvent:

This actually depends on the amount of data and the complexity of the query you need to execute. If you are processing thousands of objects and need to traverse the list to check the specific properties of each object, using the database may be faster

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>