Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 994
Prem Singh Bist Avatar asked Dec 14 '11 09:12

Prem Singh Bist


People also ask

How large can a SQLite database be?

SQLite database files have a maximum size of about 140 TB. On a phone, the size of the storage (a few GB) will limit your database file size, while the memory size will limit how much data you can retrieve from a query. Furthermore, Android cursors have a limit of 1 MB for the results.

Can SQLite handle large data?

SQLite supports databases up to 281 terabytes in size, assuming you can find a disk drive and filesystem that will support 281-terabyte files. Even so, when the size of the content looks like it might creep into the terabyte range, it would be good to consider a centralized client/server database.

How many tables can SQLite handle?

SQLite does not support joins containing more than 64 tables. This limit arises from the fact that the SQLite code generator uses bitmaps with one bit per join-table in the query optimizer.

What is the maximum size of SQLite database in Android?

Maximum Database Size 140 tb but it will depends on your device disk size.


1 Answers

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.

like image 126
ariefbayu Avatar answered Sep 19 '22 17:09

ariefbayu