Subject | Re: [firebird-support] Regular DB maintenance? |
---|---|
Author | Helen Borrie |
Post date | 2008-10-09T12:50:58Z |
At 21:07 9/10/2008, you wrote:
-- Particularly beware of CommitRetain and RollbackRetain: they are likely to be lurking in your scenario if you are using Borland/Codegear tools as your development environment.
-- Don't let your app swallow lock conflict exceptions - always handle them and always make sure you deal with the transaction accordingly.
-- Keep an eye on transaction statistics - use gstat -h as often as you need to until you get the programming right. Big (or increasing) gaps between Oldest Transaction and Oldest Active, and/or between either of them and Oldest Snapshot indicate that apps are not doing the right thing with transactions.
-- If you are likely to be doing mass deletes, take time out (at your convenience) after it completes to do a select * query on the table[s] you have deleted from.
-- there's more - check the list archives...
./heLen
>I have a deployed DB which gets light use. But I notice that afterYup.
>about a month it seems to slow down and even cause my app to get more
>buggy (doubtless this is a problem in my app code).
>I know that a solutionHaving to do backup and restore to solve that problem is "the ambulance at the bottom of the cliff". Fix up the transaction handling in your application so that you don't have uncommitted work hanging around for hours, days, months, years...
>to this is to make a backup and then restore it, but is there a
>better way which is easier for the user?
>Isn't Firebird supposed to be largely maintenance free?Indeed - if you treat it nicely. :-)
-- Particularly beware of CommitRetain and RollbackRetain: they are likely to be lurking in your scenario if you are using Borland/Codegear tools as your development environment.
-- Don't let your app swallow lock conflict exceptions - always handle them and always make sure you deal with the transaction accordingly.
-- Keep an eye on transaction statistics - use gstat -h as often as you need to until you get the programming right. Big (or increasing) gaps between Oldest Transaction and Oldest Active, and/or between either of them and Oldest Snapshot indicate that apps are not doing the right thing with transactions.
-- If you are likely to be doing mass deletes, take time out (at your convenience) after it completes to do a select * query on the table[s] you have deleted from.
-- there's more - check the list archives...
./heLen