What I did was drop a IBValidationService on a form, setup the
connection, set the SweepDB option and called
IBValidationService.StartService.
Is this procedure correct?
How can I confirm that a sweep was performed?
Thanks.
--
Erick Sasse
--
Bill Todd (TeamB)
> IIRC there is an example in the paper at
> http://bdn1.borland.com/article/borcon/files/6100/paper/6100.html
Thanks, looks like I did it right, but is there anyway to make sure the
sweep was performed? I'm asking this because I'm sweeping a Firebird
database, which is not officialy supported by IBX.
I think I can always create some garbage in the DB and try to collect
it using this sweep, but I just wanted to make sure there is no better
way.
--
Erick Sasse
Not that I know of. With IB you could use the performance monitoring
tables to see if the sweep is active.
--
Bill Todd (TeamB)
Sweep has nothing to do with garbage collection. Normally threated
databases don't need sweep. You'd better use your time to make right
transaction management in your application.
SY, SD.
> Sweep has nothing to do with garbage collection.
No. The purpose of a sweep is to garbage collect the entire database.
Garbage collection is also performed by the background garbage
collector thread.
--
Bill Todd (TeamB)
> I think I can always create some garbage in the DB and try to collect
> it using this sweep, but I just wanted to make sure there is no better
> way.
How could you tell if the garbage record versions had been collected?
There is no way to view record versions that are awaiting collection.
The best you could do is look at the record version statistics for the
table before and after the sweep. However, if the number of versions
for the table is reduced how would you know if the garbage collection
was done by the garbage collector thread or by the sweep?
--
Bill Todd (TeamB)
> AFAIK there is a way to disable the automatic GC, but I never did it.
> :)
Maybe I don't need to disable the GC at all, since it only collect
garbage from records that are read, right? I just need to be careful to
modify records creating versions but don't read anything from the table.
--
Erick Sasse
> How could you tell if the garbage record versions had been collected?
> There is no way to view record versions that are awaiting collection.
> The best you could do is look at the record version statistics for the
> table before and after the sweep. However, if the number of versions
> for the table is reduced how would you know if the garbage collection
> was done by the garbage collector thread or by the sweep?
AFAIK there is a way to disable the automatic GC, but I never did it. :)
--
Erick Sasse
> since it only collect
> garbage from records that are read, right?
My understaning is that deleted rows are passed to the GC thread when
they are deleted. A subsequent read of the table is no longer required.
--
Bill Todd (TeamB)