Looking for Resource Storage Suggestions

J

Jonathan Wood

Greetings,

I'm developing a site that will have many downloadable files. Although I'll
use a database to keep track of everything, I've decided that storing the
actual contents of these files in the database would exceed my maximum
database usage. Therefore, the plan is to use the database to index the
files but store the actual files in a subfolder.

However, it occurs to me that if I end up with possibly thousands of files
in one folder, that the act of having the operating system locating a file
in that folder would be less than optimally efficient.

I've thought about maybe storing all files that begin with A in the A
folder, all files that begin with B in the B folder, and so on. This could
be a pain though if I decide to provide functions to rename these files.

I'm just wondering if anyone else has dealt with something like this, and if
anyone had any suggestions.

Thanks.

Jonathan
 
J

Jonathan Wood

Why? This is by far the best solution...

Well, I must confess that I don't know that much about how directory entries
are structured these days--I haven't really looked into this since the DOS
days. So if someone can say for sure that Windows is able to do something
along the lines of a binary search on directory entries, then it may not be
that bad.

Otherwise, my concern is that it would be far less efficient that an indexed
database index, or possibly arranging the files into subdirectories to
reduce the number of entries being searched. If, internally, Windows uses
the FindFirstFile/FindNextFile to scan the directory for the file being
sought, that sounds horribly inefficient to me.

Thanks.

Jonathan
 
J

Jonathan Wood

Thanks. I seemed to be having trouble finding the Google terms that got
results on this topic.

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top