Hi,

I often have to create very large (hundreds of millions of records) but simple read-only databases, with sorted keys and values. I usually use BerkeleyDB for the database, and then build my own objects and methods on top of BerkeleyDB.pm. BerkeleyDB is very simple and fast, and much more suitable for these problems (IMO) than a full-blown DBMS.

I always want to retrieve a range of indexed keys and their associated values, so using tie is ineffective. Similarly, performing a (one-time) fetch of all the keys is much too inefficient. Using BerkeleyDB.pm works fine, and yet ...

... it seems that there should be a more generic way to perform these indexed-based retrievals, which accepts a range of index values as input, and allows you to iterate over the associated keys(indices) and values. Is there such a module out there?


In reply to fast+generic interface for range-based indexed retrieval by jae_63

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.