kibar
kibar

Reputation: 824

Android some about sqlite

I will working sqlite for my project. Maybe db have one table and ~40k rows. I have some question for this.

Upvotes: 1

Views: 57

Answers (2)

Maxim G
Maxim G

Reputation: 1489

SQLite has only five data types and you can calculate approximate size.

By query you get cursor (pattern) with window (buffer), the size may be 1mb.

Version of android matters.

Finally, profiling can show the real picture.

Upvotes: 1

F43nd1r
F43nd1r

Reputation: 7749

When i was use SQLiteDatabase.openDatabase() then all rows go into the memory?

No, thats the point of databases.

When query methods then this search on memory? or on db file?

A query will only load required data temporarily to apply given filters. Not even the reult is completely loaded in to memory (unless you do so with the returned Cursor).

SQLiteDatabase.openDatabase() reference i use this with static is there a problem?

Probably not, but you should avoid to keep databases open for the entire lifetime of your process.

Finally ~40k rows Is this a problem for memory performance etc?

This is not a big number for a database. It will most certainly be no problem.

Upvotes: 3

Related Questions