Jump to content

blob or longtext


Ninjakreborn

Recommended Posts

Well blob (which is the same as text) can only store just over 65,500 characters which is about 63KB of text. However longtext allows you to store dramatically more characters just under 4.3 trillion characters! Have a look at this [url=http://www.ilovejackdaniels.com/mysql_cheat_sheet.png]MySQL Cheat Sheet[/url] to see what each data types holds.
You'll probably want to use MEDIUMTEXT instead, which holds about 17 million characters, which is about 16MB.

1 character is a byte.
Link to comment
Share on other sites

There's other considerations to think about other than just how many bytes a data type will hold. For instance, if you ever plan on using full-text searches and create a full-text index, then use a text based data types instead of blobs. You can't create full-text indexes for blobs.

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.