[Zope-dev] reading the entire DB

Michel Pelletier michel@digicool.com
Thu, 26 Apr 2001 14:42:33 -0700 (PDT)


On Thu, 26 Apr 2001, nw_moriarty Last Name wrote:

> Jim
> 
> Were you able to run the script I sent previously?  I have attached it
> again.  It demonstrates that the entire DB is read each time an item
> is read.

It does this because your script creates and destroys the database
connection every time it reads an object.  If you keep this connection
open, then it won't do that.  Whenever you open a database, the whole file
is read in order to rebuild the index cache, when you .close() the
connection, the whole thing goes out of scope and is destroyed.

-Michel