ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zodb
zodb
Re: [ZODB-Dev] ZODB design. Size and saving records
by Andreas Jung other posts by this author
Jun 22 2008 9:08AM messages near this date
Re: [ZODB-Dev] ZODB design. Size and saving records | Re: [ZODB-Dev] ZODB not saving sometimes
--On 22. Juni 2008 08:54:14 -0700 tsmiller <tsmiller@[...].com>  
wrote:


> 
>  I have two questions.
>  		1)  When I already have a storeNumber and I save a record to
> 
>               			db.dbRoot['books'][storeNumber][bookNumber] = record
> 
>  		 I have to set the _p_changed flag on the 'books' IOBTREE structure to
>  get the book to save.

I don't see why you need to set _p_changed here. The change should be 
noticed automatically.



> 
>  		Which means that it saves the ENTIRE 'books' IOBTREE' structure every
>  time a save a single book.  (at least it looks like it is doing this).

Such a change will write only the data of corresponding bucket back to the 
ZODB but not the complete object. That's why we are having BTrees.

>  When I edit a book and save it the database grows by more than 64k.  And
>  it looks like it will get worse and worse as more books are added.
> 
>  		Am I looking at this correctly.  Or am I doing something really
>  ignorant?

Your code using IOBTrees looks fine (except the unnecessary usage of 
_p_changed). Your observations or conclusions appear weird to me.

-aj
Thread:
Tsmiller
Marius Gedminas
Chris Bainbridge
Andreas Jung

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved