Depending on the number of files you're expecting, you may want to limit
the number of files you put in a single folder. For example, in your
shared folder you may want to create 26 subfolders - one for each letter
of the alphabet. Then you drop the files in the subfolder matching the
first letter of the filename. There's a bit of creative play on the
subfolder 'hash', depending again on your expected filename format.
Clinton Gormley wrote:
Following on from the thread "questions on serving big file & SQL
statement parsing", I have a related question:
Where do you store your uploads?
I can think of two approaches:
1) In the DB, store the name of the server to which your file has been
uploaded
2) Store your upload in a shared partition (eg on a SAN, NFS,
iSCSI/OCFS2)
The advantage I see in the second approach is redundancy, the
disadvantage is that there will be a slight performance cost.
Anybody have recommendations/war-stories about these or other
approaches?
thanks
Clint