Subject Re: [firebird-support] How to check if index selectivity is out of date?
Author Ann W. Harrison

>But you
>spoke of non-unique. This means that there is no need to recompute for
>primary keys and unique indexes?

Right. The ratio of distinct values to index entries never changes for
unique and primary key 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?

Yes, if you create an empty database and populate it. Statistics are
computed during an index fast-load, which happens when an index is
created for existing data. If you backup and restore an index with
gbak, the data is stored before the indexes are created, so you get
legitimate statistics. If you create an empty database with indexes
already defined, then populate it, the next step should be setting
the index statistics.