Skip to Main Content

SQL & PL/SQL

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!

Basic Cardinality Calculation

766689Nov 30 2010 — edited Dec 1 2010
Hey.

Have a basic query doing a count on table based on a date range.
How do I work out the cardinality.

No Histograms (just the standard HIGH-LOW bucket)
No values in user_tab_col_statistics (no col stats).

DBA_TABLES
32433213 rows

From DBA_INDEXES for date index
32303513 distinct
28128300 clustering_factor


How do I work out the cardinality - it was like 14,936


Query was

select count(logged_in_pty_id)
from xxxx
where st_datem > to_date('11-15-2010','mm-dd-yyyy')
and st_datem < to_date('11-22-2010','mm-dd-yyyy')
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2010
Added on Nov 30 2010
9 comments
1,659 views