in reply to storing a large hash in a database
I had a process with a hash that grew too big for RAM, and tied it to disk with a few simple lines:
use DB_File; # too big for RAM now my $db = '/path/to/some.db'; my %hash; unlink $db; # to start fresh tie (%hash, "DB_File", $db, $DB_BTREE) or die("Unable to tie $db: $!") +; # do things as before untie %hash;
Performance is fine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: storing a large hash in a database
by elef (Friar) on Jun 13, 2013 at 11:50 UTC | |
|
Re^2: storing a large hash in a database
by Anonymous Monk on Dec 02, 2011 at 17:10 UTC | |
by hbm (Hermit) on Dec 02, 2011 at 17:23 UTC | |
|
Re^2: storing a large hash in a database
by Anonymous Monk on Dec 03, 2011 at 15:25 UTC | |
by hbm (Hermit) on Dec 05, 2011 at 16:18 UTC | |
|
Re^2: storing a large hash in a database
by Anonymous Monk on Dec 02, 2011 at 16:56 UTC | |
by afoken (Chancellor) on Dec 02, 2011 at 17:07 UTC | |
by hbm (Hermit) on Dec 02, 2011 at 17:09 UTC |