Index selectivity

Hello there

I'm struggling to understand the concept of index selectivity in the query tuning course.
Why is that a value of 0 to 1 and where can we list every index selectivity.

1 Like

Hello @tard_gabriel,

We need to clarify what we mean by "selectivity" in this lesson.

Index selectivity > 1 really means that there is more than one node for a particular query value. That is, the index cannot be unique.

When you call: CALL apoc.schema.nodes(), you can see the valueSelectivity for each index which is different from the index selectivity. The valueSelectivity for an index must be between 0 and 1 where 1 means that the index is unique.

Elaine

I will try to read a bit more about it in the manuel if there is a section about it.

But I don't really get what they are and what's the difference between:

  • Index selectivity
  • valueSelectivity

Thanks