Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 28 Jan 2005 @ 15:58:04 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Record count stored in Data Dictionary
From:   Dieter Noeth


  Stats just give the unique values not the row counts ... This is true if and only if you have a UPI on table that too with NOT NULL COLUMNs  

  If you have a table with NUPI , stats on NUPI will give you just the unique values but not the row counts  

True if you look at "help stats" output, but the actual row count is stored within the binary stats. And "help index" always returns the approixmate number of _rows_ in a table for the PI column[s].

  I don't understand what's the need to store row counts in dictionary  

Just to get quick info without a "select count(*)"?

MS SQL Server has that kind of info in sysindexes: approximate counts for number of rows and IIRC updated rows.

In Teradata a "select count(*) from table;" could be really fast, if it would sum up the number of rows per datablock, which is stored within the cylinder index. But it's doing a stupid Full Table Scan instead reading every datablock :-(


  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023