Subject Re: [firebird-support] How to check if index selectivity is out of date?
Author Salvatore Besso
hello Ann,

thank you for your reply.

> Running "set statistics" is not terribly expensive

yes, I've seen that for the database I'm asking for, it takes no more than
a couple of seconds for all indexes.

> and I would probably set up a script that ran through
> all non-unique indexes updating their statistics after
> every backup.

this was also my thought, a script launched as application starts. But you
spoke of non-unique. This means that there is no need to recompute for
primary keys and unique indexes?

> before and after a reset

What do you exacly mean for "reset"? Maybe before and after SET STATISTICS?

Last question: I've noticed that when the database is just created, all
RDB$STATISTICS fields are null. Does this mean that it's recommended to
execute SET STATISTICS almost once before deploying the database? Is there
any negative impact leaving RDB$STATISTICS null?