← Back to team overview

maria-discuss team mailing list archive

mariadb prefers using indexes despite low cardinality


Taking the example as provided in my last mail: I created a table with 4 text columns and indexed the 4th column with a prefix length of 1.

To trigger high no. of index scans I used the following where clause -- f4 like 'klas9dufa9us09df8a8%'

Explain shows mariadb still chooses to use the index despite high no. of scans required.