Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CBO-terms.....selectivity,Cardinality

User13077819-OracleJul 3 2013 — edited Jul 3 2013

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2013
Added on Jul 3 2013
5 comments
1,074 views