You can take the metaphor further and use:

/datadir/key1/key2/key3/key4/.../file

If you look at most high capacity mail routers (if you have linux, you have one of these) they use a similar scheme, with an index to get to the files quickly. There are people around who are doing mini-projects to have database-backed file systems, and file system databases. Expect an explosion when the hurd is released and there really is no difference between a file system and a database.

Certainly this would be your most efficient choice for sorting a huge volume of information, if you have a good file system to do it on.

There have been some hurtful words bandied around about file system databases vs. real database backing for different applications. I don't have links to the nodes but there are some interesting discussions about the best choice for a mailer, etc.

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re: Sometimes, the File System is my hashtable... by jepri
in thread Sometimes, the File System is my hashtable... by rje

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.