Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Jan 2005 @ 14:59:51 GMT


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


Subj:   Re: Record count stored in Data Dictionary
 
From:   Geoffrey Rommel

  I would like to know if the record count for a table is stored in Teradata DD (Data Dictionary)  



This question comes up a lot. I don't know of any DBMS that keeps track of the number of rows in every table, and yet people keep asking for it.

If keeping track of the exact number of rows in certain tables is important to you, you could keep the count in a table (defined as, say, decimal(15) rather than integer) and then update it with triggers: add 1 for each insert, subtract 1 for each delete. It would also be wise to update the number by actually running "select count(*)" in a weekly batch job, just to make sure. Seems like a lot of overhead, though....



     
  <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