The term selectivity is used when talking about database indexes. This is the formula to use to calculate the selectivity of an index.
Selectivity of index = cardinality/(number of records) * 100%
it basically measures how “selective” the values within a given column are.
even if a column has an index created for it, that does not mean the index will always be used, because scanning the table directly without going through the index first could be a better, more efficient, option.
When there is a low selectivity value, it may be better to not use a database index
Read full article from Selectivity in SQL Databases
Selectivity of index = cardinality/(number of records) * 100%
it basically measures how “selective” the values within a given column are.
even if a column has an index created for it, that does not mean the index will always be used, because scanning the table directly without going through the index first could be a better, more efficient, option.
When there is a low selectivity value, it may be better to not use a database index
Read full article from Selectivity in SQL Databases
No comments:
Post a Comment