Prabha
Prabha

Reputation: 434

What is the Maximum size of the image to be stored as BLOB in sqlite database?

I am storing image as BLOB in sqlite database. Can anyone please tell me the Maximum size for the image to be stored as BLOB in sqlite database .

Upvotes: 11

Views: 14210

Answers (3)

Kermit
Kermit

Reputation: 5982

As of September 2020: 2.15GB

https://www.sqlite.org/limits.html

current implementation will only support a string or BLOB length up to 231-1 or 2147483647

Workarounds:

  • Compress your file.
  • Split your file by column.
  • Split your file by rows.
  • Use multiple blob fields.

Upvotes: 2

pollux1er
pollux1er

Reputation: 5921

The maximum size of data to store in BLOB can go up to 2.1 Gb in sqlite database.

Upvotes: 1

user647772
user647772

Reputation:

See the limits of SQLite

The maximum number of bytes in a string or BLOB in SQLite is defined by the preprocessor macro SQLITE_MAX_LENGTH. The default value of this macro is 1 billion (1 thousand million or 1,000,000,000).

This is roughly equivalent to 1 Gb.

Upvotes: 11

Related Questions