Prem Singh Bist
Prem Singh Bist

Reputation: 1313

SQLite database maximum storage capacity

How many records in an SQLite database can we maximally store? Is there any limitation? If the data goes beyond this limitation what type of error does it give? Will the whole the system fail, or what else happens?

Upvotes: 15

Views: 21173

Answers (2)

developer
developer

Reputation: 43

Its 140 terabytes Maximum . In more details

SQLite was originally designed with a policy of avoiding arbitrary limits. Of course, every program that runs on a machine with finite memory and disk space has limits of some kind. But in SQLite, those limits were not well defined. The policy was that if it would fit in memory and you could count it with a 32-bit integer, then it should work.

Upvotes: 4

ariefbayu
ariefbayu

Reputation: 21979

Based on this page:

Android does not impose any limitations beyond the standard SQLite concepts. We do recommend including an autoincrement value key field that can be used as a unique ID to quickly find a record. This is not required for private data, but if you implement a content provider, you must include a unique ID using the BaseColumns._ID constant.

The limit is tied to SQLite limitation. As for what happened when we hit that limit, I guess android will raise SQLiteFullException.

Upvotes: 14

Related Questions