Where summary stats are stored

Database
Enthusiast

Where summary stats are stored

Hi Experts ,

Can somebody please tell me where summary stats are stored . Thanks in advance .

Tags (1)
5 REPLIES
Enthusiast

Re: Where summary stats are stored

Not pretty sure of the question. You can refer to this wonderful blog of Dieter:

http://developer.teradata.com/blog/dnoeth/2013/08/new-statsinfo-query-for-td14

After obtaining the details of summary , you can see the summary stats  too with

show summary statistics on yourdbnameyyyyyyy.tabelnameyyyy or

show summary statistics values on yourdbnameyyyyyyy.tabelnameyyyy 

Enthusiast

Re: Where summary stats are stored

Hi Raja ,

Thanks for your reply . Like stats and histograms have their table in TD14 where summary stats are stored ?

Are they stored in table header or in the statsinfo table .

Enthusiast

Re: Where summary stats are stored

From the doc: 

http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1142_111A/ch02...

Summary statistics are recorded in the histogram header. The header records the following information.

Collection timestamp

Statistics version

Sampling percentage (if the summary statistics were collected by sampling)

Number of columns

Number of high‑biased values

Number of equal‑height intervals

Number of history intervals

Number of AMPs

Number of nulls

Number of all nulls

Average AMP NUSI rows per value

Total number of values and total number of values from partial nulls

Total number of rows

High modal frequency

Offset to the column descriptor

Offset to the minimum value

Offset to the high modal value

Beginning offset to the histogram intervals

Ending offset for the histogram intervals

Size of the histogram header

note: I have less idea on this topic.

Enthusiast

Re: Where summary stats are stored

Thank you very much ..

Senior Apprentice

Re: Where summary stats are stored

The stats created by "COLLECT SUMMARY STATS" are also stored in the 'Histogram' column of dbc.StatsTbl with StatsId = 0