I agree. Which is why I created Tie::Hash::DBD to make that transition easy. Works fantastic with DBD::SQLite.

Here is a speed comparison table for Tie methods. Higher is better:

Size op Native GDBM NDBM ODBM SDBM DB +_File CDB_File Berkeley SQLite Pg mysql C +SV ------ -- ---------- ---------- ---------- ---------- ---------- ----- +----- ---------- ---------- ---------- ---------- ---------- -------- +-- 20 rd 1428571.4 119047.6 84388.2 73800.7 91743.1 46 +403.7 512820.5 25031.3 17226.5 3287.3 1573.4 1003 +.0 20 wr 1428571.4 80971.7 59171.6 50377.8 42553.2 45 +766.6 425531.9 24600.2 12586.5 1481.4 361.0 1079 +.7 200 rd 2739726.0 142959.3 110132.2 93985.0 105652.4 57 +954.2 947867.3 32631.8 22634.7 7008.2 1574.5 203 +.4 200 wr 2409638.6 151285.9 100200.4 86355.8 51533.1 75 +358.0 943396.2 41999.2 15764.2 2941.3 961.0 375 +.2 600 rd 2597402.6 145384.1 118506.8 106345.3 122299.2 66 +430.5 823045.3 40952.8 30453.8 11594.7 646.6 + - 600 wr 2409638.6 167597.8 117947.7 101078.2 53922.9 74 +915.7 840336.1 46285.6 19183.4 6221.4 692.4 + -

And a wider table with more tests (Redis) and Oracle over a network connection to show the difference

Size op Native GDBM NDBM ODBM SDBM DB +_File CDB_File Berkeley Redis Redis2 SQLite +Pg mysql CSV Oracle ------ -- ---------- ---------- ---------- ---------- ---------- ----- +----- ---------- ---------- ---------- ---------- ---------- -------- +-- ---------- ---------- ---------- 20 rd 1538461.5 198019.8 69204.2 120481.9 118343.2 112 +359.6 5870.3 33670.0 2681.0 8445.9 24301.3 5299 +.4 1962.1 922.3 13.5 20 wr 1428571.4 10000.0 4977.6 7132.7 8009.6 13 +271.4 5762.0 5748.8 1578.5 5055.6 7336.8 2050 +.2 330.7 923.0 10.1 200 rd 2702702.7 107874.9 83612.0 134952.8 126984.1 81 +699.3 62208.4 39714.1 4399.0 8974.2 39254.2 6762 +.9 1133.2 173.6 - 200 wr 2352941.2 40966.8 32883.9 45808.5 39416.6 50 +037.5 42973.8 28739.8 4709.0 10041.7 23253.1 3220 +.6 827.4 310.9 - 600 rd 2564102.6 128369.7 97783.6 146163.2 140449.4 85 +239.4 158061.1 47487.1 8628.4 8731.1 42206.0 9700 +.9 778.4 - - 600 wr 2362204.7 83079.5 57055.9 90252.7 60416.9 72 +930.6 136955.0 43387.1 8272.4 10566.7 27189.9 4749 +.3 705.0 - - 2000 rd 2684563.8 152741.7 107020.5 130140.6 126334.4 86 +258.9 300887.6 57529.1 8747.6 8518.9 44319.4 11954 +.1 252.5 - - 2000 wr 2478314.7 111476.5 82929.1 113205.4 72605.8 92 +481.3 297353.6 58036.6 10676.7 9254.8 32776.1 6942 +.5 377.4 - - 20000 rd 1044495.5 216129.8 144686.4 141118.4 139843.5 94 +996.1 589396.8 73721.3 7906.3 7701.9 42048.0 10357 +.6 - - - 20000 wr 849978.8 141592.9 117982.3 116057.8 100241.1 81 +400.4 557258.3 68183.5 10320.7 9551.0 34828.3 6060 +.0 - - - 200000 rd 783195.8 194928.0 165518.0 151744.7 141365.1 94 +102.3 632621.1 77415.2 8474.9 7581.6 37026.0 10458 +.3 - - - 200000 wr 634952.9 81291.7 76701.4 76440.5 100155.6 56 +343.1 618880.8 50298.0 10557.4 9090.7 29200.8 6197 +.1 - - -

Enjoy, Have FUN! H.Merijn

In reply to Re^2: storing hash in temporary files to save memory usage by Tux
in thread storing hash in temporary files to save memory usage by Anonymous Monk

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.