On Tue, Feb 22, 2011 at 22:51, Maurits van Rees
<m.van.r...@zestsoftware.nl> wrote:
> I wonder it it may help to set pack-gc to false during the first pack.
> According to the docs this is faster, though it of course leaves more
> unused objects behind.  Set pack-gc to the default true value for
> subsequent packs.  Theoretically this should make sure that the first
> pack will finish on time and leave an already smaller database; after
> the second pack the database is at its smallest.

That would be a good idea indeed.

Without GC enabled, it won't analyse object references. As a result,
the number of queries run during a non-GC pre-pack is far lower too,
so it's a lot easier on the database. Pre-pack becomes 5 queries,
essentially (3 inserts, 2 truncates), as opposed to 17 + batched
reference updates + batched pack state updates.

And with the 'easy' records cleared out with a non-GC run, presumably
queries during a GC run should be easier on the database as there is
less data to scan through.

Martijn Pieters
For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to