Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 18 Mar 2010 @ 19:19:49 GMT


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


Subj:   Re: Partition Detail
 
From:   Joseph D silva

Rehman Ansari wrote:

  Which Dictionary Table should enquire to get Partition Detail of a Table including Partition Size.  


You can get partitioning info here ...

     SELECT DATABASENAME, TABLENAME, CONSTRAINTTEXT
     FROM DBC.IndexConstraints
     WHERE ConstraintType = 'Q'

By partition size if you mean the number of records in a given partition,

you will have to run a query against the table itself ...

     SELECT PARTITION, COUNT(*)
     FROM tablename
     GROUP BY 1
     ;

It's not really a full table scan or anything so will be quick.

You can also get that ~ number from stats if your stats are 100% up to date.

IF you want to translate that into physical disk spaces, an approximate method would be to join with dbc.tablesize and do some factoring in there ..


Joseph D'silva



     
  <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