MYSQL: Use TEXT or BLOB?


#1

Greetings,

I set up a “WYSIWYG” editor on my website so people can type up nice looking posts: http://tinymce.moxiecode.com/index.php

In my MySQL database, I am storing the data into a field with “varchar”. Someone said it would be best to use TEXT BLOB for storing these kinds of things.

What usually works best for storing this type of stuff and which one uses less resources and loads quicker? What should the maximum “Length/Values” be set at? I would like the user to be able to put in lots of information, but not an infinite amount of information. Plus, if I say something like 100,000 characters maximum, the HTML or (BB) code or whatever is going to also be taking up space in the background besides the visible characters and letters that people are typing in.

I was hoping someone familiar with that type of stuff would know the ideal standards.

Thanks


#2

Read http://dev.mysql.com/doc/refman/5.1/en/blob.html and you should be able to figure out which one works better for your situation.