Selectivity
The selectivity represents a fraction of rows from a row set.
The selectivity is tied to a query predicate, such as last_name = 'Smith', or a combination of predicates, such as last_name = 'Smith' AND job_type = 'Clerk'.
Cardinality
Cardinality represents the number of rows in a row set.
the selectivity is the "number of rows" / "cardinality", so if you have 10K customers, and search for all "female", you have to consider that the search would return 10K/2 = 5K rows, so a very "bad" selectivity.------why its "bad" selectivity.
So, Can I relate cardinality with Histogram....
what is meaning of "Selectivity"...everywhere I see, its fraction ranges from 0.0 to 1.0....so on...
Plz explain me what the terms differ "selectivity" and "cardinality", how optimizer is relating this 2 words.
Regards