Subject Re: [firebird-support] Re: Performance with indices
Author Pavel Menshchikov
Hello Adam,

A> Selectivity is a measure of index duplicates. A selectivity of 5
A> means that for every value in the index, there are (on average) 5
A> records that contain this value. The lower the selectivity, the more
A> useful it is. A selectivity of 1 indicates a perfect one value to one
A> record match. Primary keys by definition require this. Therefore,
A> every primary key index and 'unique' constraint index will always
A> have a selectivity of 1, regardless of the number of records in the
A> table.

But it seems that FB works with indices statictics, which, I guess,
equals to a selectivity devided by a number of records in the table.
And if the number of records changes, indices statistics should be
recomputed too, shouldn't it? And IIRC, statistics recomputing is a
semi-automatic process in FB...


--
Best regards,
Pavel Menshchikov
http://www.ls-software.com