On Fri, Feb 12, 2010 at 9:19 AM, Vikram A <vikkiatb...@yahoo.in> wrote:
> I am in the situation to storing student and staff images. every year 2000 > new photos has to be added in our application. > > Can i have your suggestion, which is the best one, storing as a blob Or > using NFS? > It will be great help to me, because such experts are sharing your own > experience on this binary storage issue. > I never said you had to grovel, though :-p This whole thread has been a discussion of just that. My personal opinion is that it's better to store binary objects (like images) out-of-band, for instance on an NFS system like you suggest. Other people on the list have made their own arguments for BLOB storage. In the end, it's down to your own situation and decisions, but I will keep defending the position that filesystems are made for storing files, and databases are made for storing data - it saves you on both database and PHP requests, as (from a web point of view) you can't return the image data inside your HTML - it requires a second HTTP call. Filesystem image serving, however, could perfectly be offloaded to a subdomain that runs a lightweight, threaded HTTP server that need not run the heavy PHP processes. You could even run that on your NFS server, if you want. If you do go for BLOBs, though, for god's sake keep them in a separate table, lest you fragment your datafiles. Split records are a disaster for performance. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel