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

AB> The selectivity is calculated as :
AB> 1 / (Total Number of index nodes / Number of duplicated nodes)

So, selectivity and FB's statistics of an index mean the same. (in my
previous post I used Adam's definition for the selectivity, and I
tried to correlate that definition to FB's statistics)

>>> And if the number of records changes, indices statistics should be
>>> recomputed too, shouldn't it?
>>
>> For Foreign keys and non unique indices, yes, changing the number of
>> records does indeed impact the selectivity.

AB> If the proportion of new records stays the same in a
AB> non-unique index compared to the existing one. Then the
AB> selectivity wouldn't change much.

What about a unique index? In the original post Alexandre says that
PK stays active while he perform a bulk insert... Should he recompute
the statistics during the bulk insert? Could it improve the insert
performance?


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