What is the SQLite storage limit?

19

There is a new demand for the company application where I work, I need to store more than 100k of records in different tables, I'm worried if SQLite will handle such a demand, my question is:

  • Does SQLite have a storage limit?
  • The type of data influence on limit storage?
asked by anonymous 27.08.2015 / 15:40

1 answer

19

The line limit is 2 raised to 64, meaning there is no practical limit.

There is a 128TB limit on the total bytes of the database, which is difficult to achieve in practice. Reminding you that SQLite works with every database in a single file.

Of course, this limit depends on SQLite configuration, either in its compilation, or by some PRAGMA .

Nearly all database boundaries can be configured and relevant ones are available at documentation .

Page size can positively or negatively affect database performance. In general, the best results are achieved between 8K and 32K, which would limit the size a little more if you want the maximum performance.

The biggest problem with SQLite scalability is when you need a very large number of concurrent writes. Because its locking does not have granularity, any attempt of recording prevents other writings even in points that are not in competition. It does not affect reading unless you're not using WAL, which is recommended in almost every situation.

The data type does not influence the limit, only on the occupied size. Of course, each type has its own limit.

    
27.08.2015 / 15:44