Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

To blob or to reference to blob?

That is the question

8:59 am on Jun 22, 2010 (gmt 0)

5+ Year Member

Are there any performance advantages to using a reference to a blob in a separate table in order to keep rows a fixed size, or does it just mean smaller indexes?
4:18 pm on Jun 24, 2010 (gmt 0)

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Generally speaking, if you are storing images or other files in a database blob then you are going to have performance problems. Better to store a reference to a file path on a disk as filesystems are almost always faster than databases.

That said, if you are going to store blobs but you don't always need to return them in every query, you'll definitely see a benefit from storing the blobs in a separate table. If every time you query a row you need that blob though, there would be less of a performance benefit from splitting them out (but still some benefit).
8:00 am on Jun 25, 2010 (gmt 0)

5+ Year Member

Actually, I worded the question badly - I'm more interested in Text than Blob but came to much the same conclusion as you.

From my further research - it's MySQL and the table will not be heavily updated so will be using MyISAM. There are benefits to fixed length fields in MyISAM. This text field is to allow me to add some (keyword) text to a certain form of UGC where I choose to do so. I only need the text when querying the row to create the page, but I will also be querying the row for creating navigation links so... as you said... keep them separate.