HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

what is bigger than a longblob?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
longblobthanbiggerwhat

Problem

the longblob is the biggest data type of Mysql. If I want to save something bigger than 4gb (longblob) how can I do?.

I'm talking about Mysql v-5.+

Solution

Using LONGBLOB can be very risky in light of the fact that the biggest max_allowed_packet is only 1GB.

Back in August 2006, someone asked a similar question. in which Peter Zaitsev said:


http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html


As you can see in theory it is about 4GB.


It is however also limited by max_packet_size which is 16M by default.


I would be very careful using blobs larger than 100MB. MySQL will
need some 3 times of this size of memory allocated on the server for
blob processing.

I am not a PostgreSQL DBA, but I would have to venture the following suggestion:

  • If you must store objects that big, you should go with PostgreSQL because it has a storage infrastructure called the The Outside Attribute Storage Technique (TOAST). This allows rows not to be too big for SQL processing.



  • If you must use MySQL, you are much better off storing URL File Links than the BLOB itself.

Context

StackExchange Database Administrators Q#17314, answer score: 6

Revisions (0)

No revisions yet.