Subject Re: [firebird-support] UPDATE Statistics or other maintenance?
Author Helen Borrie
At 09:03 PM 11/04/2005 -0500, you wrote:

>I have seen occasional mentions of using
>To update the internal statistics... Is this true???

Errm, no. This is sometimes recommended as a way to force immediate
garbage collection on a table after huge deletes.

SET STATS in isql can update the statistics. However, the server updates
the statistics each time after all users log out and the first user logs
back in.

>We have been performing a gbak backup and a gbak restore each night...
>so I am curious if we need to be doing anything more to keep the
>database in good shape.

No. There's nothing quite like starting over with a freshly restored
database, in which all pages are consolidated and all indexes, including
constraint-enforcing indexes, are newly built.

>I would like to know if I should be performing some additional tasks
>and what the benefit would be.
>This is not a huge db, but at least one table that has well over a
>million records and a few other tables are close behind.

A daily backup is fine but a *daily* restore is probably
overkill. However, if that's what you are doing and you are happy to do
it, then there's nothing quite so sparkly as starting every day with a
reborn database. :-)) I do hope your daily restore is not being performed
using the -r[eplace_database] switch, though.