Search code examples
c++performancefilefat32fat16

FAT, optimize performance when retrieve a file


I have an implementation of database with one file per record, and I have about 10000 records. I'm trying to optimize the performance of access to file, and I have a little doubt.

Is split files into folders better then keep all in single folder, for quick access to the files? ex: from 0 to 999 in folder 0, from 1000 to 1999 in 2 etc...

What is better for this, FAT16 or FAT32?


Solution

  • If you are accessing the files directly, then you won't have any performance drop. If you are searching for a particular file on the disk, it would be faster to store them in folders. This way folders would emulate db indexes. But as @blow mentioned, why don't you use something like Sqlite?