Storing messages as BLOB (Binary Large Object) or ordinary text? Storing messages as BLOB (Binary Large Object) or ordinary text? database database

Storing messages as BLOB (Binary Large Object) or ordinary text?


There are a lot of questions you need to ask yourself when making that decision. There's a very detailed article, To BLOB or not to BLOB, that is the question: Whether to store string in BLOB, or CHAR, or VARCHAR? (archived), that talks about some of the things to consider.


If by "messages" you mean something like SMS or IRC, stuff with a defined limit then I think VARCHAR is the most appropriate. If your messages can really be any size then TEXT would be better.

But I wouldn't have thought BLOB was suitable for anything except perhaps attachments (assuming your system has them). BLOBs are meant for binary files (e.g. images, Word documents) not pure text.