Web Hosting Talk







View Full Version : mysql performance


OnlineRack
01-03-2007, 12:34 AM
We are building a Database for a client. this database will grow pretty big so performance needs to be taken into consideration.
My question is this, the client wants to store images (one per each account (4000+)) into the mysql database. another developer thinks it should be stored in a non exposed location and call each image when needed as this would make thing smoother and quicker overall.
the images are around 1MB max.
what are your thoughts as far as performance for the entire site:
A) Storing the images in the Database
b) Storing the images in a secured folder on the server

thanks,

theBleeber
01-03-2007, 01:52 AM
I would definately go with the second option personally. Purely from a mathmatical standpoint, if you have 4000 users and each has a 1MB picture in the DB then you are looking at an almost 4GB database. Not the easiest thing to backup/restore and move if needed.

My vote is with the developer. Although, if you are designing it for the client and the client wants it the other way, all you can do is suggest your method and hope they bite.

juangake
01-03-2007, 08:44 AM
I would say b) option (in a folder), just because the overhead to *display* should be higher if stored on a database, but the Oracle article made me think twice :P

A pair of links if it helps...

http://forums.devarticles.com/database-development-6/storing-images-in-database-or-not-1003.html

http://www.oracle.com/technology/products/intermedia/htdocs/why_images_in_database.html

Regards,

Juan

FahimF
01-03-2007, 10:18 AM
I'd personally go for option b as well - if there are a lot of images and they are accessed quite often, your server is going to be under quite a bit of load if you store the images in a mySQL db.