Last post Jun 20, 2016 04:45 PM by PatriceSc
Jun 20, 2016 04:17 PM|smilu|LINK
I have a system where I am uploading files to a network folder from my website. I will have huge number of file uploads per day. Each user will have different types of files to upload. Now, we are in a doubt on the way we are storing our files in the Folder.
We have two options
In the second case I will have multiple sub folders and the sub folders might again have up to 3 nested folders inside it and finally the file inside it.
Which one of the above will be good for Performance in future when we are reading the file from these folders. As in both cases i will have all the information, path, filename in my DB and i will be calling the files directly from my application.
My only concern is when the folder grow big, which approach will be faster and why I should go for it?
Kindly help me in this. I do not have anyone who could help me with this situation.
Jun 20, 2016 04:45 PM|PatriceSc|LINK
Or you could also group them by day for example rather than by user so that you keep a limited number of files in each folder (seems anyway you'll use already a unique name rather than the user defined name). Depends maybe on which kind of grouping you'll
use to show all those files to users.
Also if using SQL Server 2012 or later you could consider
https://msdn.microsoft.com/en-us/library/ff929144(v=sql.110).aspx that basically offers the best of both worlds (files are stored in the db, but you can still access (and even add/modify them) through a network share if you want and you can save the db
with or without those files). Even if not using this features it might be interesting to take some inspiration from that...