Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File size limit for SQLite on 32bit system

Tags:

sqlite

I'm using sqlite as temporary storage to calculate statistic about moderately large data set. I'm wondering what will happen if my database exceed 2GB on 32 bit system. (I can't currently change the system to 64 bit)

Does it use memory mapped files and break if size of file exceed addressable memory? (like mongodb)

like image 924
Piotr Czapla Avatar asked Nov 30 '10 13:11

Piotr Czapla


People also ask

What is size limit in SQLite?

Maximum Database Size The maximum size of a database file is 4294967294 pages. At the maximum page size of 65536 bytes, this translates into a maximum database size of approximately 1.4e+14 bytes (281 terabytes, or 256 tebibytes, or 281474 gigabytes or 256,000 gibibytes).

What is the maximum size of SQLite database in Android?

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

What is the maximum size of a varchar in SQLite?

(9) What is the maximum size of a VARCHAR in SQLite? SQLite does not enforce the length of a VARCHAR. You can declare a VARCHAR(10) and SQLite will be happy to store a 500-million character string there. And it will keep all 500-million characters intact.

Is SQLite faster than file system?

General Findings. SQLite is competitive with, and usually faster than, blobs stored in separate files on disk, for both reading and writing. SQLite is much faster than direct writes to disk on Windows when anti-virus protection is turned on.


1 Answers

According sqlite documentation, maximum size of database file is ~140 terabytes and is practically limited by os/file system.

You can read more here (note the Pages section): http://www.sqlite.org/fileformat2.html

like image 52
barti_ddu Avatar answered Sep 19 '22 17:09

barti_ddu