[ZODB-Dev] Re: Heavy size increasing of database after adding
anobject
Tim Peters
tim at zope.com
Fri Dec 3 12:24:42 EST 2004
[Manuel Markwort]
> Sorry about my late reply, first I had to make several changes to my
> code, but now it works and enlarging of data.fs' size is not so horrible
> yet.
>
> Thanks to all for your prompt help about my problem. All of you were
> right, I found out that the high enlarging has its origin in several
> wrong designed classes (because there were some dictionaries which are
> not of type PersistentMapping, thanks Tim). After changing the code I
> could decrease the increasing about 4/5.
Good! And thanks to Malcolm Cleaton for an excellent explanation too.
> Refering to Malcom (see below), is it possible to disable the undo?
> Because I'm adding about 1500 objects to the database in a short period
> of time and I don't really need the undo.
At least read the first section at the link posted last time:
http://zope.org/Wikis/ZODB/FileStorageBackup
It's telling the truth <wink>: a FileStorage grows only by appending. That
happens to provide natural support for undo, but it grows only by appending
period, regardless of whether you want to use undo. IOW, no, there isn't a
way to disable undo, but it wouldn't do you any good if there were. The
need for periodic packing is a fundamental consequence of the way
FileStorage works, independent of undo (and of any other exposed feature).
There are no supported disk-based storages where packing isn't needed. We
(Zope Corp) released experimental storage implementations based on Berkeley
DB, one of which didn't support undo and needed no packing, and the other of
which did support undo but had an autopack feature that ran without manual
intervention. Alas, support for these was dropped, due to complexity, lack
of visible interest, and lack of support (nobody wanted these enough to
volunteer work on them -- which is a real shame, according to me):
http://zope.org/Wikis/ZODB/BerkeleyStorageDocs/BDBStorage.html
More information about the ZODB-Dev
mailing list