Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 12 May 2002 @ 17:35:10 GMT


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


Subj:   Re: SQL to get table name with row counts?
 
From:   Thomas F. Stanek

Another approach, which less precise but far less system intensive, is to take a strategy similar to the idea about parsing the Arcmain output.

When doing a HELP INDEX on a table, the DBMS provides a column that gives an approximation of the total rows from the table. I'm not sure exactly how the value is computed (The EXPLAIN is no help here.) but the estimated values are consistently within a 1-2% of the actual value. Can anyone from NCR shed some light on how this value is computed?

Depending upon your requirements, this could be a way to capture this information in a very low impact manner, rather than scanning every table for which you want row counts.

If pursing the Arcmain approach, one suggestion would be to write the archive file to dev/null (or DD DUMMY in MVS). This would allow you to run the Arcmain without actually having to generate the output files or tapes. Also, from a resource standpoint, Arcmain tends to be relatively light in terms of AMP usage.


Regards,

Thomas F. Stanek
TFS Consulting
www.tfsconsulting.com



     
  <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