Okay.. I'll bite.. Why on Earth would you load a hash with 150 million key/value pairs!? Software packages like Oracle and MySQL were developed for one major reason: Storing large amounts of data for optimal retrieval requires lots of code tricks.

I'll assume you have a good reason and move on. :) The size of a hash is actually not infinite -- As you've found, the hash gets unusable after a certain size. I know there's a module out there called something like *::BigHash, but I can't find anything on it. Am I imagining things, or do any other monks know about this module?

Update: Cool! I'm learning about the specifics of DB_File now because of your question. Thanks! Anyway, maybe you need to use a different hashing algorithm? Can you tell if your program is bound by CPU cycles, Disk I/O, etc. when it begins to fail? Have you tried toying around with cachesizes on your DB_Hash? What about the different key sizes (if your data can relevantly be stored as a BTREE)? Can you give us a little more info about the data so we can help you out? And, what kind of computer are you using that can handle all this data!?!?


In reply to Re: millions of records in a Hash by joealba
in thread millions of records in a Hash by johnkj

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.