Junior — Middle
Can you explain what is meant by a low level of selectivity in the context of working with databases?
sobes.tech AI
Answer from AI
Low selectivity in databases means that the query condition selects a large portion of the table's rows. For example, if an index is built on a column with many repeating values, and a query searches on this column, the selectivity will be low because many rows match the condition.
Low selectivity degrades performance because indexes are less efficient — many records need to be scanned. In such cases, the optimizer may prefer a full table scan over using the index.