Subject | Re: [ib-support] Re: Automatic garbage collection? |
---|---|
Author | Ann W. Harrison |
Post date | 2001-10-26T14:22:50Z |
At 10:48 AM 10/26/2001 +0000, smart@... wrote:
in a procedure. Your database is getting slower for two reasons:
1. Garbage collection
2. Garbage build-up
The reason for garbage collection is to eliminate outdated information
that slows down processing. Turning off garbage collection will cause
your databases to get bigger and slower. I have two suggestions:
1. Backup with garbage collection enabled daily, during low usage
hours.
2. Reduce the cost of garbage collection. In most cases this means
reducing the number of duplicate values in indexes. For user
defined indexes, append the primary key to the key with many
duplicates. For example, if you have an index on month of birth,
add the employee number, keeping the month of birth first.
Another way to reduce the cost of garbage collection is to eliminate
foreign key constraints that have a small number of parent records
and large numbers of children. Replace those constraints with triggers
(almost as good). If you need to index the referencing column in the
child table - usually because you need to cascade actions - then follow
the rule above and build a compound index.
Regards,
Ann
www.ibphoenix.com
We have answers.
>Hummm. That's not a good solution in our situation.... We should needActually that wouldn't work since you can't disable an index
>to edit many many procedures.
in a procedure. Your database is getting slower for two reasons:
1. Garbage collection
2. Garbage build-up
The reason for garbage collection is to eliminate outdated information
that slows down processing. Turning off garbage collection will cause
your databases to get bigger and slower. I have two suggestions:
1. Backup with garbage collection enabled daily, during low usage
hours.
2. Reduce the cost of garbage collection. In most cases this means
reducing the number of duplicate values in indexes. For user
defined indexes, append the primary key to the key with many
duplicates. For example, if you have an index on month of birth,
add the employee number, keeping the month of birth first.
Another way to reduce the cost of garbage collection is to eliminate
foreign key constraints that have a small number of parent records
and large numbers of children. Replace those constraints with triggers
(almost as good). If you need to index the referencing column in the
child table - usually because you need to cascade actions - then follow
the rule above and build a compound index.
Regards,
Ann
www.ibphoenix.com
We have answers.