How much can SQLite store on the iPhone?

后端 未结 12 2107
一整个雨季
一整个雨季 2020-12-10 15:44

I have an idea for a webapp for the iPhone but its unknown to me how much data can be stored in mobile Safari\'s SQLite db. I tried searching through the Apple docs but foun

12条回答
  •  独厮守ぢ
    2020-12-10 16:22

    Maximum Database Size

    Please refer Official Sqlite site

    Every database consists of one or more "pages". Within a single database, every page is the same size, but different database can have page sizes that are powers of two between 512 and 65536, inclusive. The maximum size of a database file is 2147483646 pages. At the maximum page size of 65536 bytes, this translates into a maximum database size of approximately 1.4e+14 bytes (140 terabytes, or 128 tebibytes, or 140,000 gigabytes or 128,000 gibibytes).

    This particular upper bound is untested since the developers do not have access to hardware capable of reaching this limit. However, tests do verify that SQLite behaves correctly and sanely when a database reaches the maximum file size of the underlying filesystem (which is usually much less than the maximum theoretical database size) and when a database is unable to grow due to disk space exhaustion.

提交回复
热议问题