Search code examples
phpmysqlntfswindows-server

Saving lot of my files in a one directory on NTFS


I have a sharing service, and I have 100,000+ files on one NTFS directory on Windows 2008 server.

The question is, about performance, is it better to add all the files to mysql blob?


Solution

  • Storing files on filesystem vs database is discussed in detail here. Storing that many files in one directory is definitely a bad idea. You might run into performance issues.

    A better idea is to create subdirectories under that directory. They can be organized by:

    • Year/Month
    • First x characters of filename
    • First x characters of MD5 hash of filename