Comments - Condition Selectivity Computation Internals
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
TODO: name in the optimizer trace ^
Names in optimizer trace are: selectivity_for_indexes, selectivity_for_columns, cond_selectivity
It would be nice in the beginning of this article to explain what the numerical value of selectivity represents.
I assume selectivity is the ratio of the number of rows that satisfy a particular condition to the total number of rows in the table. The selectivity of 1 means all rows selected, the lower the number the better is selectivity, the selectivity of 0 means no rows selected. Please, correct me if I'm wrong.