3 ms·
For small files, I could see this being true, but not in a way that would scale to large files. For example, instead of a database, you could make a folder (in
by cbanek 9y ago
For small files, I could see this being true, but not in a way that would scale to large files.
For example, instead of a database, you could make a folder (instead of a table) and then a bunch of 4 byte files with ints in them. Doing a table scan would be like cat *.
Obviously this uses a lot more open/close/read calls, with more seeks and iops, because those files may or may not be clustered together on disk. If you packed it all into the same file, it would go faster because of the locality and less system calls. You can also be smarter about caching and other things that the file system does well, but probably isn't optimized for the small file use case.