Mnesia tables: load times and sizes after deletion

Ulf Wiger (ÄL2/EAB) ulf.wiger@REDACTED
Thu Aug 14 14:46:00 CEST 2003


Are you sure the tables were created under R9B?
If so, are you sure they are dets files (.DAT when using 
mnesia)?

Granted, I've been on a long vacation and my brain may not
have engaged fully yet, but I recall that disc_copies are
stored on disk in disk_log format (mnesia gives them the 
extension .DCD), and not as dets files. Disc_only copies
are stored as dets files.

The file size should adjust at every log dump,
and a load time of minutes seems a bit slow, perhaps, but
I wouldn't want to swear that it's abnormal.

/Uffe

-----Original Message-----
From: Bruce Fitzsimons [mailto:Bruce@REDACTED]
Sent: Thursday, August 14, 2003 14:07
To: erlang-questions@REDACTED
Subject: Mnesia tables: load times and sizes after deletion


Gentlemen,

I've just been playing with my little jukebox I wrote for broadcasting
background music in Erlang. It logs the songs played into an mnesia table
'playlog' (set, disc_copies).

I managed to get 71,000 entries into the table, at which point it took a
number of minutes to open on my little Duron 1300 w/ ATA100 hd

I used a (inefficient) mnemosyne query to get all the entries older than 1
day and delete them, and this worked. Surprisingly fast, to mnemosynes
credit.

What did surprise me is that the on-disk size, and the size reported by
mnesia:table_info(playlog, size) continued to increased (it was still
playing).

Is this normal? The docs say size = total number of records, is it actually
max size? Even after the delete and normal shutdown the table did not shrink
in either sense. It still took a number of minutes to open too.

I guess I'm just curious to know if this is normal?

I attempted to directly open the mnesia files under dets to query them...but
that is apparently not allowed. A good thing probably.

Thanks for any info. I've deleted and recreated the table now. This is all
under R9C (nice work guys, great docs), although the DB was created using
R9B-1.

/Bruce




More information about the erlang-questions mailing list