questions regarding databases created with dbm and ndbm routines

Sundar Narasimhan sundar at wheaties.ai.mit.edu
Thu Jun 9 04:21:13 AEST 1988


Hi: I have a question regarding the size of dbm and ndbm databases. In
the bugs section of the man pages to these databases there is a
comment indicating that these database files (the .dir, and .pag
files) cannot be copied, tar'ed etc without filling the holes in them.
Does this comment also apply to the dump program that does file system
backups? 

Also, I have about 1000 records each ~600 bytes. The ndbm database
created from these records is rather big. (see below)

-rw-rw-rw-  1 sundar     196608 Jun  8 03:59 1984/WREQ.dir
-rw-rw-rw-  1 sundar   1604270080 Jun  8 03:59 1984/WREQ.pag

Is this normal for ndbm databases ? How does this compare with
databases created with dbm routines ? 

Although the size is large, the database is fast for lookups. However,
I have a need for a search capability that may need to iterate over
all the records. This tends to be slow. Is there any version of these
routines that is faster than the std. routines in 4.2/3/Sun OS 3.5?

One last question, regarding reclamation of file space upon deletion. 
Why is this hard to do? and has anyone added this capability?

-Sundar
(sundar at wheaties.ai.mit.edu)



More information about the Comp.unix.questions mailing list