Hi!

leegold wrote:
Reading about DBs I am seeing the term "selectivity".

What does it mean? Seems like it has something to do with the
distribution or pattern of data in tables(?)

Right, it does.

A search criterion is highly selective if it _ex_cludes a high proportion of the data.

My standard example is an index on the field "gender" (or "sex") of a table listing all members of a typical army: As most soldiers are male, a search "... where gender = 'm'" would return something like 90 % of the table's rows, so it is not very selective.


It's coming up in discussions about optimization...

Yes.
Depending on the command and its complexity, one general approach to optimization may be to reduce the amount of data to handle as fast as possible - by applying the criterion with the highest selectivity.

Especially with a cost-based optimizer, correct assumptions about the selectivity of the various criteria are needed to determine the best strategy.


HTH,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to