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
https://forums.phpfreaks.com/topic/25496-blob-or-longtext/#findComment-116332
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
https://forums.phpfreaks.com/topic/25496-blob-or-longtext/#findComment-116340
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.