开发者

File size limit for SQLite on 32bit system

I'm using sqlite as temporary storage to calculate sta开发者_如何学Gotistic 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)


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


Though this is an old question, but let me share my findings for people who reach this question.

Although Sqlite documentation states that maximum size of database file is ~140 terabytes but your OS imposes it's own restrictions on maximum file size for any type of file.

For e.g. if you are using FAT32 disk on Windows, maximum file size that I could achieve for sqLite was 2GB. (According to Microsoft site, limit on FAT 32 system is 4GB but still my sqlite db size was restricted to 2GB). While on Linux , I was able to reach 3 GB (where I stopped. it could have reached more size)


Find out your file system type of the partition. Remember that the file size limit its not dependent with the OS 32-bit or 64-bit, but with partition type of your hard disk.

See Wikipedia

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜