Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 30 Oct 2007 @ 11:48:08 GMT

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

Subj:   Re: How to find Partitioning Space?
From:   Dieter Noeth

Mushtak Mirajkar wrote:

  Is it possible to find out space used in each of the Partitions of a Populated Partitioned Table, based on the Range conditions (e.g. Month or Day as the case may be) given while creating the Partitioned Table in TD?  

You can't get the actual permspace per partition, just the rowcount per partition, but if you join that to dbc.tablesize you can calculate an approximate permspace (including SIs):

        count(*) as cnt,
        cur_perm * ((cnt (float)) / sum(cnt) over ()) as approx_perm
     from partitioned_table,
        (select sum(currentperm) as cur_perm
         from dbc.tablesize
         where databasename = 'partitioned_table'
         and tablename = 'partitioning_column') dt
     group by 1

If the number of partitions is up to 200 (and that number is enough) you can use help stats for a quick look at rows per partition.


  <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