|
|
Archives of the TeradataForum
Message Posted: Tue, 30 Oct 2007 @ 11:48:08 GMT
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):
select
partition,
count(*) as cnt,
min(partitioning_column),
min(partitioning_column),
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.
Dieter
| |