What is the best practice for storing a large number of files referenced in a database in a file system?
We are currently moving from a system that stores about 14,000 files (about 6 GB of images and documents) into a MySQL database. It quickly becomes unmanageable.
Currently, we plan to save files using the primary key of our database in the file system. I am worried about possible performance issues related to the fact that many files are in the same folder. In addition, these files will be inserted by several different applications on the same server.
In particular, I would like to know:
- Is this a good solution considering these parameters?
- Will it leave room for further scaling in the future?
- Are there any problems storing many files in one place?
- Is there a better way to name / distribute files?
source
share