I have a couple hundred Articles (class instances) in my ZODB. Most instances are 200 kB, some are much larger. One of the Article properties is Number of times the article was read. Any increment causes ZODB to grow by the size of the given instance, due to the fact that ZODB will append a new version of the whole 200 kB or 2MB instance just because a single byte was changed.

Consequently ZODB grows several hundred MB in a single day even if no new article is added.

This calls for some form of non-undoable storage.

One possibility is to move the "NumberOfReaders" attribute from ZODB to my SQL server. Not a problem, but I'm not sure what is the best way to maintain connection between ZODB instance (it can appear at different places in ZODB directory structure and it can be moved from place to place with Cut and Paste in ZMI) and SQL table. Connection means SQL key column. Instance ids cannot be used as a SQL key, because they are nonunique - each folder has a sequence of instances numbered 1...x. So there are over ten instances named "1". Instance addresses = URLs could be used but I would have to write my own methods / interfaces for moving Articles in the directory structure to maintain the connection between ZODB and SQL table.

Is there an obvious elegant solution that I am missing?

Milos Prudek
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to