homepage Welcome to WebmasterWorld Guest from 54.237.151.188
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
To blob or to reference to blob?
That is the question
Status_203

5+ Year Member



 
Msg#: 4156657 posted 8:59 am on Jun 22, 2010 (gmt 0)

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?

 

whoisgregg

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



 
Msg#: 4156657 posted 4:18 pm on Jun 24, 2010 (gmt 0)

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).

Status_203

5+ Year Member



 
Msg#: 4156657 posted 8:00 am on Jun 25, 2010 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved