Subject | Re: [firebird-support] Different plans on query |
---|---|
Author | Arno Brinkman |
Post date | 2004-02-06T11:07:11Z |
Hi,
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.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> Excuse me Ivan...Yes you're wrong ;-)
>
> 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?
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.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81