Subject | Re: [firebird-support] Different plans on query |
---|---|
Author | dade2000 |
Post date | 2004-02-06T11:29:59Z |
Arno Brinkman wrote:
the FB ones :-(
Thanx Daniele
> Hi,Thanx for "fix".My formula is general for any index but doesn't match
>
>
>
>
>>Excuse me Ivan...
>
>>Selectivity is
>
>>SingleRowInTable / TotalRows
>
>>In PK this is 1 and index has the better selectivity
>>when SingleRowInTable become < TotalRows then selectivity decrease --> 0
>
>>so bigger values (near 1) are better for selectivity.
>
>>I'm wrong?
> Yes you're wrong ;-)
>
> Ivan is completly right the lower the selectivity the beter.
>
> Calculated selectivity is with this formula :
> Selectivity = 1.0 / (Nr_of_index-entries - Nr_of_duplicates)
> If the number of duplicates is high in the index then the index-selectivity
>
> value is higher, but worser to use.
the FB ones :-(
Thanx Daniele