cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction DB02

Former Member
0 Kudos

It’s getting late, so please excuse me if this is obvious:

From transaction code DB02 can I just use the Sample size (as the number of rows in the table) and then whatever dimension I wish to analyze use the distinct value column? To determine cardinality as the ratio of the Distinct Value: Sample Size.

Also to confirm that I should be using the F fact table as the table that I analyse. Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

When statisitics are collected on a table, they can be computed by examing every row, or a sampling of the rows, using a percentage you specify. Typically, with very large tables, sampling is done to reduce the time it takes to collect the statistics. You'll need to see how statistics collection is done at your installation (it can vary quite a bit) by talking to your DBAs. A table with 50 million rows might only have a 5% sampling performed, which with most data is adequate. There are times where the distribution of the data can be very skewed and that is why histograms might be built on a table.

Unless you have some reason to believe that the data distribution is unusually skewed, sampling should provide reasonably accurate estimates of the distinct values.

If you are "computing" statistics on a table, the distinct value counts should be accurate.

If you have doubts about the distribution of the data on a table that uses sampling to collect statistics, you could perfrom your own queries on each column and compare the distinct values that you get to what's in the statistics, or you you also increase your sample rate, e.g. from 5% to 10% and see if any of your distinct value counts have changed substantially.

Any statistics you might gather form DBA_TABLES or DBA_TAB_COLS is from the statistics collection process, be it sampling or computing.

Former Member
0 Kudos

Hi PizzaMan,

You actually recommended DB02 as a solution to determine distinct values for a column (I posted under the subject Columns under Table).

I have just had a mind block and was wondering whether you could confirm if when I am looking to determine the Cardinality of a Dimension (in this case to determine whether Line Item Dimensions or High Cardinality should be checked), I should be working with the F fact table. Thanks

Former Member
0 Kudos

Hi haripal,

DB02, gives you different kind of views i.e w.r.t Tablespaces / Table; History, etc.

What is that you are specifically looking for?

if it is about the fact tables and statistic runs, consider using DBA_TABLES. It gives you the entire information.

Regards,

GPK.