Some considerations (I'm no expert on SSD's and DB's, I just know how to utilise them):
First:
- Faster is subjective, so ymmv, so what's faster is what's fastest for your situation. Benchmarking is always a good idea, as no one can tell you if a solution will be better for you until you give it a go.
- DB's are great at finding and sorting large datasets fast and efficiently
- Maintainability and flexibility of code should be a consideration. If using a DB will add extra goodies, then use it.
- You may want to hide the uploaded files and obfuscate the filename for security, and serve files only to logged in users, you'll need a db then as it makes it easier to implement.
- If you have only a few hundred files per directory with low site traffic then a db might be overkill. Also, if you have tens of thousands of files, having them in one directory is slower then separating them into multiple directories.
- Using a DB will mean you'll need to synchronize the filenames to the db, whereas using just the filesystem you wouldn't need to concern yourself with this.
Second:
- SSD's are made from various technologies eg non-volatile NAND flash memory or DRAM (requires constant power source hence it's volatile).
- With the slower flash based SSD's you also have MLC or the longer lasting SLC.
- Generally SSD lifetime is about write life (actually the erase limit of the cells), which is around 10 000 operations (or 5 000 depending on firmware version).
- Once an SSD reaches the end of it's life (0% health), it'll stay read-only, but the hardware controller or the software will fail long before the cells loses its data.
- If your data is important then RAID your drives. Swapping drives out before they fail will help keep peak performance in check. It's recommended to swap out when health is around 10-15%
You'll need to weight your options. With a small amount of files and low traffic a DB can be slower or just adds complexity.
With tens of thousands of files, security, plus more traffic blah blah blah, a DB would be indispensable IMO.
Hopefully that helps :)