|
Posted by Roman Ziak on 07/29/06 22:33
Miguel Cruz wrote:
> b007uk@gmail.com wrote:
>> Thank you!
>> Maybe I won't need to use mysql after all!
>> File names are words or frases that may have digits, separated by '-',
>> like this: this-is-one-file.txt this-1-is-another.txt and-more.txt
>> ill try to change '-' to '/' and save it like that:
>> ./t/this/is/one/file.txt
>> it should work
>> Thank you for the idea again!
>
> If you do this you will have to make a lot of directories all the time.
>
> If the names are pretty unpredictable like that, how about just taking
> the md5() of the name and using the first character of that? That way
> you get 16 buckets to spread them out over.
>
> miguel
Or take first 2 or 3 digits and get a hash-space of 256 or 4096
subdirectories and filesystem will be still humming fast with 1,000,000
files.
roman
Navigation:
[Reply to this message]
|