Subject | garbage collection aspects |
---|---|
Author | kopaka |
Post date | 2008-02-25T12:56:59Z |
Hi,
I would like to know more - or if my suggestion is right - about
garbage collection process in those 2 situations:
1.
I have table where is very often more records (up to 100) inserted and
deleted. Deleted records is garbage what will be removed by garbage
collector when recods will be read. There is no natural read of this
table so by this way recods are not cleaned. Second possibility is
automatic sweep, which is by default set up as 20000 difference between
OIT and OAT. In our database is not so big difference.
So am I right that under those conditions garbage will remain till
mannually run sweep (or recover database) ?
If yes, what is the best approach to solve situation ?
Implement into software some natural reading of this table (known select
count(*) ......) to clean table ?
Manipulate with difference between OIT and OAT to make up running
automatic sweep more often ? How to tip in this case the best
difference between OIT and OAT ?
Or set up running sweep command by scheduler ?
2.
When more records (in my case cca 5 milions) are deleted from table,
then next time when garbage collection is run, it will take very much
time. On my test db. I run for select count(*) from table and after 12
hours I broke it without result. I read about it that is time consuming
but what garbage collection is doing on deleted pages and how to
estimate time duration roughly ?
Is generaly better to avoid delete much records from table ? What to do
in case I will need such action ?
3.
Now I am doing some test about speed between FB 1.5.2 and FB 2.0.3 and
seems to me, that when I am repeating an action which involves table I
spoke about it under point 1 (it's records are deleted and again
inserted so garbage is growing in this table ) then FB 2 speed is
constantly slowing - more garbage more slow, while under FB 1.5 not.
Does anyone have some suggestion about it ?
Action I am speaking about is just selection for print report, table
where records are deleted and inserted is an helper table used to cover
user selection criteria.
thank for your responses, tomas
I would like to know more - or if my suggestion is right - about
garbage collection process in those 2 situations:
1.
I have table where is very often more records (up to 100) inserted and
deleted. Deleted records is garbage what will be removed by garbage
collector when recods will be read. There is no natural read of this
table so by this way recods are not cleaned. Second possibility is
automatic sweep, which is by default set up as 20000 difference between
OIT and OAT. In our database is not so big difference.
So am I right that under those conditions garbage will remain till
mannually run sweep (or recover database) ?
If yes, what is the best approach to solve situation ?
Implement into software some natural reading of this table (known select
count(*) ......) to clean table ?
Manipulate with difference between OIT and OAT to make up running
automatic sweep more often ? How to tip in this case the best
difference between OIT and OAT ?
Or set up running sweep command by scheduler ?
2.
When more records (in my case cca 5 milions) are deleted from table,
then next time when garbage collection is run, it will take very much
time. On my test db. I run for select count(*) from table and after 12
hours I broke it without result. I read about it that is time consuming
but what garbage collection is doing on deleted pages and how to
estimate time duration roughly ?
Is generaly better to avoid delete much records from table ? What to do
in case I will need such action ?
3.
Now I am doing some test about speed between FB 1.5.2 and FB 2.0.3 and
seems to me, that when I am repeating an action which involves table I
spoke about it under point 1 (it's records are deleted and again
inserted so garbage is growing in this table ) then FB 2 speed is
constantly slowing - more garbage more slow, while under FB 1.5 not.
Does anyone have some suggestion about it ?
Action I am speaking about is just selection for print report, table
where records are deleted and inserted is an helper table used to cover
user selection criteria.
thank for your responses, tomas