Obtain partition count (including non-empty) for PPI and MLPPI tables

Database
Teradata Employee

Obtain partition count (including non-empty) for PPI and MLPPI tables

Client would like to obtain a count of currently defined partitions for PPI and MLPPI tables, including non-empty partitions. SELECT COUNT DISTINCT on PARITITION column only returns a count of non-empty partitions. I did notice the DBC view indexconstraints includes ConstraintText which has the maximum number of partitions in the column value, if one is willing to perform some simple string manipulations. The same is not true for MLPPI. Any way to get a total partition count for a PPI (other than the aforementioned process) or MLPPI table ?

1 REPLY
Senior Apprentice

Re: Obtain partition count (including non-empty) for PPI and MLPPI tables

In TD14 this info can be found in the new dbc.PartitioningConstraintsV view.

Before TD14 my StatsInfo tries to extract that, but only for PPI:

How to decode the binary statistics stored in dbc tables

Dieter