Discussion:
How to sweep database
(too old to reply)
Erick Sasse
2008-07-23 03:15:32 UTC
Permalink
Is it possible to perform a sweep in a database using IBX components? I
could not find any documention about it.

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]
2008-07-23 03:39:46 UTC
Permalink
IIRC there is an example in the paper at
http://bdn1.borland.com/article/borcon/files/6100/paper/6100.html
--
Bill Todd (TeamB)
Erick Sasse
2008-07-23 11:17:59 UTC
Permalink
Post by 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
Bill Todd [TeamB]
2008-07-23 13:58:49 UTC
Permalink
Post by Erick Sasse
Post by 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.
Not that I know of. With IB you could use the performance monitoring
tables to see if the sweep is active.
--
Bill Todd (TeamB)
Dimitry Sibiryakov
2008-07-23 18:15:46 UTC
Permalink
Post by Erick Sasse
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.
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.
Bill Todd [TeamB]
2008-07-23 17:47:37 UTC
Permalink
Post by Dimitry Sibiryakov
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)
Bill Todd [TeamB]
2008-07-23 17:50:24 UTC
Permalink
Post by Erick Sasse
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)
Erick Sasse
2008-07-23 18:40:00 UTC
Permalink
Post by Bill Todd [TeamB]
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
Erick Sasse
2008-07-23 18:48:01 UTC
Permalink
Post by Erick Sasse
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
Bill Todd [TeamB]
2008-07-23 19:06:39 UTC
Permalink
Post by 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)
Continue reading on narkive:
Loading...