Hi All,

Which DBM file is recommended to be used with Perl5 "tie"?

Context: I intend to write a database statistics script which will go
through a largish database and count instances per-day or per-hour. For
instance one count will be "number of people who sent a message in each day
of the year".

In order to keep track of each submitter (e.g. if Joe Shmoe sent two
messages on July 4th I want to count him once) I plan to use a simple hash
array of "data,username".

Since it could become a very large hash (total of 140k individuals, times
number of days in the last couple of years makes it over 100 million
potential records), I think that tie'ing it to a DBM file will help
alleviate the memory requirements.

Question is - which DBM file would be recommended? I suppose I should look
for speed. Berkeley DB is almost the default but my experience with it (not
through perl tie, but direct programming in C++) was that it's not 100%
reliable (it's very fragile), and there is GDBM, and GNU are known to do
some cool stuff.

The file might be transient (once the count is over I'll keep it in a
PostgresQL 8.1 database), but maybe I'll keep it around for the updates.

Any thoughts? Personal war stories?

Thanks,

--Amos

Reply via email to