Australia/Sydney
BlogSeptember 22, 2009

Selectivity and Cardinality

Fahd Mirza
In performance tuning, understanding key concept of selectivity and cardinality are very important.

According to the Chris Antognini:

Selectivity is the value between 0 and 1, and it is the fraction of rows returned after applying a filter on the table. For example if a table has 10,000 rows and the query returns 2601 rows, the the selectivity would be 2601/10000 or .26 or 26 percent. Selectivity enables you (or optimizer for that matter) to decide which data access method is optimum in the execution plan.

Cardinality is the number of rows returnd by an operation on the table.
Share this post:
On this page

Let's Partner

If you are looking to build, deploy or scale AI solutions — whether you're just starting or facing production-scale challenges — let's chat.

Subscribe to Fahd's Newsletter

Weekly updates on AI, cloud engineering, and tech innovations