Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to sweep database

22 views
Skip to first unread message

Erick Sasse

unread,
Jul 22, 2008, 11:15:32 PM7/22/08
to
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]

unread,
Jul 22, 2008, 11:39:46 PM7/22/08
to
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

unread,
Jul 23, 2008, 7:17:59 AM7/23/08
to
Bill Todd [TeamB] wrote:

> 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]

unread,
Jul 23, 2008, 9:58:49 AM7/23/08
to
Erick Sasse wrote:

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

unread,
Jul 23, 2008, 2:15:46 PM7/23/08
to
Erick Sasse wrote:
> 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]

unread,
Jul 23, 2008, 1:47:37 PM7/23/08
to
Dimitry Sibiryakov wrote:

> 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]

unread,
Jul 23, 2008, 1:50:24 PM7/23/08
to
Erick Sasse wrote:

> 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

unread,
Jul 23, 2008, 2:48:01 PM7/23/08
to
Erick Sasse wrote:

> 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

Erick Sasse

unread,
Jul 23, 2008, 2:40:00 PM7/23/08
to
Bill Todd [TeamB] wrote:

> 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

Bill Todd [TeamB]

unread,
Jul 23, 2008, 3:06:39 PM7/23/08
to
Erick Sasse wrote:

> 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)

0 new messages