Maximum Limits in SQLite

MD Aminul Islam Nov 09, 2022
Maximum Limits in SQLite

In this article, we will see the max size of SQLite database and its limitation and efficiency.

Max Size of SQLite Database

Here we are going to see all max limits in SQLite.

Name Variable Max size
Maximum length of BLOB or String SQLITE_MAX_LENGTH 2147483647
Maximum No. of Columns SQLITE_MAX_COLUMN 2000
Maximum SQL Statement length SQLITE_MAX_SQL_LENGTH 1,000,000,000
Maximum No. of Tables In A Join 64
Maximum Depth of An Expression Tree SQLITE_MAX_EXPR_DEPTH 1000
Maximum No. of Arguments On A Function SQLITE_MAX_FUNCTION_ARG 100
Maximum No. of Terms In A Compound SELECT Statement SQLITE_MAX_COMPOUND_SELECT 500
Maximum Length of A LIKE Or GLOB Pattern SQLITE_MAX_LIKE_PATTERN_LENGTH 50000
Maximum No. of Host Parameters In A Single SQL Statement SQLITE_MAX_VARIABLE_NUMBER 999
Maximum Depth of Trigger Recursion SQLITE_MAX_TRIGGER_DEPTH 1000
Maximum No. of Attached Databases SQLITE_MAX_ATTACHED 10
Maximum No. of Pages In A Database File SQLITE_MAX_PAGE_COUNT 4294967294
Maximum No. of Rows In A Table 264 (18446744073709551616 or about 1.8e+19)
Maximum Database Size 4294967294 pages
Maximum No. of Tables In A Schema 2147483646

There is no need to upgrade the max values because it is very hard to design a database that exceeds the maximum limit.

If you are using a large database with many tables, then it requires more time to successfully execute a query and show you the result. So, Execution time is the major performance scale in this topic.

MD Aminul Islam avatar MD Aminul Islam avatar

Aminul Is an Expert Technical Writer and Full-Stack Developer. He has hands-on working experience on numerous Developer Platforms and SAAS startups. He is highly skilled in numerous Programming languages and Frameworks. He can write professional technical articles like Reviews, Programming, Documentation, SOP, User manual, Whitepaper, etc.

LinkedIn