When setting up a database I want to use the most efficient data type for potentially fairly long data. Currently my project is to store song titles and thoughts pertaining to that song. Some titles might be 5 characters or longer than 100 characters and the thoughts could run pretty long.

Is it more efficient to use a varchar set to 8000 or to use a blob? Is using a blob the same as a varchar, in that there is a set size it is allocated regardless of what it holds? or is it just a pointer and it doesn't really use much space on the table? Is there a certain set size of a blob in KB or is it expandable?

2 Answers 2


I would suggest using TEXT over BLOB.

Primary Difference

  • TEXT and BLOB is stored off the table with the table just having a pointer to the location of the actual storage.

  • VARCHAR is stored inline with the table.

Primary Guideline

  1. Text format messages should almost always be stored as TEXT (they end up being arbitrarily long)

  2. String attributes should be stored as VARCHAR (the destination user name, the subject, etc...).

To choose on when to use VARCHAR and when to use TEXT has been discussed extensively on Stack overflow in these threads:

  1. MySQL: Large VARCHAR vs. TEXT?

  2. MySQL varchar(2000) vs text?

There is also a performance comparison thread for this on MySQL forum.

  • 1
    Thank you for those links. They answered some of the questions I had, and I did end up using a TEXT. It wasn't exactly what I was looking for as far as the physical space it takes up on the server, but I guess as long as it is only going to be a small project it doesn't matter. Later if I start to do larger projects I will need to find out though.
    – BillyNair
    Jul 1, 2012 at 2:41

I think you should use blob only if you have complex data type serialized, that is if you want to store in a single table a complex class. If you only want to store a String (or something equivalent) do not use blob.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.