[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Database size problem



  Hello everybody,

  I've done a little program to test ozone, by creating, reading and deleting
an incremental number of objects, with incremental size. The basic algorithm
is:


  open connection to local ozone database (using LocalDatabase)

  for size = 10,100,1000,10000 do

    for objects_number = 10,100,1000 do
      create(objects_number, size)
 			read(objects_number)
			destroy(objects_number)
    end for

  end for

  close connection


  The problem here is the disk usage of the ozone database. It always
increases size, despite of deleting all objects in every iteration. I suposed
that it would become nearly empty at the end of every iteration of the inner
loop.

  It works as expected if I put the open/close connection into the first loop,
like this:

  for size = 10,100,1000,10000 do
 
    open connection to local ozone database (using LocalDatabase)
  
    for objects_number = 10,100,1000 do   
      create(objects_number, size)
     	read(objects_number)
  		destroy(objects_number)
    end for

    close connection

  end for

 
  But I think it isn't the correct solution.  

	If transactions that involve a change in the objects state, driven by the
interface marked methods (with /*update*/), how can I manage transactions
involving the creation and destruction of objects?.  


  Thanks.
  

    -------------                       

Cèsar Ordiñana  -  cordin@iti.upv.es    /////  |||||  \\\\\
Inst. Tecnològic d'Informàtica           /       |       \
Universitat Politècnica de València   /////      |      \\\\\
Tfn: 96 387 72 37

    -------------