1

MariaDB - What's the max blob size?

I've seen data exceed 64k on mysql databases. There has to be a higher cap, right? Configurable or otherwise or maybe a different data type?

Can anyone point me in the right direction or let me know if there is some workaround?

2
  • 1
    Hint: There's documentation that sheds light on these otherwise dark mysteries. Commented Jul 17, 2018 at 1:49
  • While you can store 4GB in a column, MySQL really isn't the optimal solution for storing files. So, always consider using a filesystem and storing the path in MySQL when applicable. Commented Jul 17, 2018 at 1:57

2 Answers 2

3

MariaDB has a LONGBLOB type, which, according to the documentation, can be as large as 4GB:

A BLOB column with a maximum length of 4,294,967,295 bytes or 4GB (2^32 - 1). The effective maximum length of LONGBLOB columns depends on the configured max_allowed_packet size in the client/server protocol and available memory. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.

Sign up to request clarification or add additional context in comments.

Comments

2

A TINYBLOB is limited to 255 bytes, but is no better than, and arguably worse than VARBINARY(255).
A BLOB is, by definition, limited to 64K bytes.
A MEDIUMBLOB is, by definition, limited to 16M bytes.
Time provides the definition for LONGBLOB.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.