examerioLogin
← Backend PythonQuestion 31 of 49

Why might an index not be used when most rows match the condition?

📘 Explanation

When most rows match a condition, the index has low selectivity, so a full table scan avoiding random I/O can be cheaper than traversing the index. The other reasons—sorting preference, uniqueness requirements, or aggregate functions disabling indexes—do not reflect how query planners actually work.

📖 Learn: Indexes & query performance

Related questions

← PreviousNo login needed