Hi,
Selectivity refers to the fraction of rows from the rowset that meets the predicate requirement.
It can be calculated as reciprocal of number of distinct rows in the coulmn,If the distinct values in the column are evenly distributed.
If the distinct values in the column are not evenly distributed then optimizer looks for histogram for selectivity.
Cardinality refers to the number of rows from the rowset.
Can it be calculated as selectivity*num_rows in the coulmn/table ?
In Bitmap Index.
We used to create bitmap index on a coulmn , whose cardinality is low .
Here the cardinality can be calculated by : - num_distinct_rows/total_num_rows
My question is ,What is the difference between optimizer's cardinality and the cardinality based on which the Bitmap index is created ?
Thanks,